Hi!
Sylvain Munaut wrote:
I think not neccessarily so. If there is no specified value for any enum value then IIRC they are all undefined, and could thus also be negative. Bad.
The C99 standard clearly states ( 6.7.2.2 paragraph 3 )
"An enumerator with = defines its enumeration constant as the value of the constant expression. If the first enumerator has no =, the value of its enumeration constant is 0."
Ah good! I guess we only care about C99 compilers.
//Peter