GCC 4.0 enumerations

Moderator
Posts: 133
Joined: 2008.05
Post: #1
My brain is incredibly fried right now, so if this sounds stupid, I apologize.

In the past, it was perfectly legal for me to write code like this:
Code:
enum SomeEnumeration
{
...
};

Which is how FLTK(some graphics library that is cross-platform and we must use for class) declares their enumerations. Unfortunately, gcc 4.0 is raising an error anytime I use the enumeration as type, a parse error before the variable name. I can't go in and change the libraries to typedef enum {} SomeEnumeration;, so is there a compiler flag I can do this with?
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #2
If it's C code, then the name of the type is "enum SomeEnumeration". If you want, you can make your own typedef: typedef enum SomeEnumeration SomeEnumeration.

If it's C++, then both names are automatic.
Quote this message in a reply
Post Reply