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

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> 2010-12-05 
04:18:55 UTC ---
(In reply to comment #2)
> > 8 is out of range of the enum.
> 
> I agree.  Unfortunately, with -O3, 8 is reported as in the range.

if a program has undefined behaviour then you shouldn't expect consistent
results at different optimisation levels ... but luckily for you gcc 4.6 is
more forgiving of out-of-range enums

Reply via email to