This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: anonymous structs in unions
Hmm, I tried with 2.95.3 and it complained. I take it gcc 3.2 understands this
kind of constructs, I might consider switching to it (and recompiling tons of
software that uses the old ABI, but that's it, it had to happen someday :) )
Thank you for clearing this up for me.
On Thursday 27 February 2003 19:15, Dan Kegel wrote:
> Mihnea Balta wrote:
> > I've found out quite a while ago that gcc and g++ don't like constructs
> > like:
> >
> > union something{
> > struct{
> > int a, int b;
> > };
> > struct{
> > float c, d;
> > };
> > } a;
> >
> > a.c = 12.f;
>
> If you fix the typos (, -> ;), that compiles nicely with gcc3.2.
> - Dan