This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Anonymous union members problem


Hi Mathieu,

>Is this invalid C++ code ?

Yes, this is invalid C++ code.

>If yes is there a way to make it valid and compilable under Linux ?

Take the typedef out of the anonymous struct.
--or--
Name the anonymous struct so it is no longer anonymous.

I favor the second.

HTH,
--Eljay


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]