Re: Anonymous union members problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Mathieu,

>Humm... do you have any reference about that ?

Try "g++ -pedantic -Wall -W foo.cpp".

Anonymous structures and classes are not C++. (Anonymous unions are C++.)

ISO 14882:1998 section 9.1

>I already thought about these 2 possibilities... but none of them is actually suitable: this anonymous struct is generated by a macro that take a type as parameter (aim of the typedef) which is particular to this structure. So any other idea ?

Then your code is not C++, it's merely C++-ish.

You'll need to use a compiler that is compatible with your source code's C++-ish variant. There may be a GCC flag that relaxes the rules and would allow your code to compile with GCC 3.3. I don't know of such a flag, off the top of my head.

HTH,
--Eljay


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux