I’m using gcc, which implements enums as 32 bit integers on the architecture I have (don’t know in general). If I try to assign an enum value too large, I get
warning: integer overflow in expression
Is there a way to make gcc use 64 bit integers as the underlying integer type? A gcc specific way is fine, although if there’s a portable way, that’s even better.
** Edit **
This is a related post: 64 bit enum in C++?
Unlike that question, I’m also interested in gnu extensions.
The following works for me with
-std=c++0x, but not with-std=c++98thoughI tested this with