------- Additional Comments From john at johnmaddock dot co dot uk  2005-08-08 
09:57 -------
Is the print member really already overflowed?  It has a value of 0200 which is
0x80: so if char is signed (it is on cygwin) then it's setting the sign bit,
which should be OK I think.  Although I admit I would have prefered the use of
an unsigned type as a bitmask.

Aha! Is this the cause? : the signed value is promoted to an int initially *with
sign extension*, and then when the compiler has all the values it desides that
the enum needs only one byte for storage, so it tries to fit all the values into
"signed char", and only then finds that the promoted value won't fit?  I'm just
making wild guesses here you understand!

Thanks, John Maddock.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23271

Reply via email to