Anonymous union members problem

Mathieu Fluhr mfluhr@nero.com
Mon Apr 19 13:55:00 GMT 2004


Hello Eljay

Thanks for answering so quiclkly. I still have some questions/remarks...

>  >Is this invalid C++ code ?
> 
> Yes, this is invalid C++ code.
> 

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

>  >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.
> 

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 ? 




More information about the Gcc-help mailing list