[PATCH 1/3] [builtins] Generic support for __builtin_speculation_safe_load()
Jakub Jelinek
jakub@redhat.com
Wed Jan 17 17:22:00 GMT 2018
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
More information about the Gcc-patches
mailing list