https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71255
--- Comment #11 from rguenther at suse dot de <rguenther at suse dot de> --- On Tue, 24 May 2016, mpolacek at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71255 > > --- Comment #10 from Marek Polacek <mpolacek at gcc dot gnu.org> --- > Well, so far my plan is to gather symbols in > #pragma GCC may_alias SYMBOL > to some vector of symbols and then when declaring a SYMBOL check if it's in > the > vector and if so, apply the may_alias attribute. Now, as Richi points out, > I'll probably have to introduce two variants: > > #pragma GCC may_alias SYMBOL > #pragma GCC may_alias struct SYMBOL > > The symbols in the vector would serve as a "tentative" forward declaration. > > Do you see any problems with that? Not really but a #pragma GCC tentative struct sockaddr __attribute__((may_alias)); would then also allow for other attributes to be tentatively added so that might be a little less special.