On Wed, Jan 17, 2018 at 05:17:29PM +0000, Joseph Myers wrote: > On Wed, 17 Jan 2018, Richard Earnshaw wrote: > > > + if (TREE_CODE (type) == ARRAY_TYPE) > > + { > > + /* Force array-to-pointer decay for c++. */ > > + gcc_assert (c_dialect_cxx ()); > > What's the basis for the assertion? Why can't you have a pointer-to-array > passed in C?
Yeah, please see e.g. the PR82112 patches for a reason why something like this doesn't work in C, try it with -std=gnu90 and struct S { int a[10]; } bar (void); ... __whatever_builtin (bar ().a, ...); Jakub