https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71255
--- Comment #17 from rguenther at suse dot de <rguenther at suse dot de> --- On Fri, 27 May 2016, fw at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71255 > > --- Comment #16 from Florian Weimer <fw at gcc dot gnu.org> --- > (In reply to Marek Polacek from comment #15) > > Yeah, only the C++ side was changed. I think it's wrong that we reject the > > testcase in Comment 14 in C (I have a fix for that). > > Good. > > > But even with that fixed we still need the new #pragma because of the second > > testcase in Comment 13, right? > > I'm surprised this is even valid C. The test case as-is does not seem > relevant > to the glibc usage scenario because all completions would use the may_alias > attribute. Only some forward declarations would not. This could be a > relevant > fringe case we need to support: > > struct S s; > struct __attribute__((may_alias)) S { int i; }; > > Although it can only arise if there is a definition *before* including the > relevant header file. > > I think the real question is whether it matters anywhere if a pointer to an > incomplete struct has the may_alias attribute or not. As we can't dereference it it doesn't matter I think.