[GCC-XML] Re: enum types in gccxml

Brad King brad.king at kitware.com
Mon Aug 2 14:46:17 EDT 2004


Ivan Kissiov wrote:
> 	I would expect the artificial attribute to show up on the typedef'd
> enumeration, but instead it is the named enum declaration that gets it,
> i.e. it is the enum Foo {...]' that is artificial.
> 
> 	Is that how you intended it?

Yes, because that is how it appears in GCC's internal representation. 
The idea is that

   enum foo {};

in C++ is almost the same as

   enum foo {};
   typedef enum foo foo;

in C because the compiler adds the typedef artificially.

-Brad



More information about the gccxml mailing list