[Bug c++/54140] -Wswitch shouldn't complain about out-of-range values that are cast to the correct type
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Jul 31 15:27:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54140
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-07-31 15:27:09 UTC ---
(In reply to comment #0)
> This would have been appropriate if I wrote "case 72:", but I didn't -- I wrote
> "case (Enum)72:". This is an explicit indication that I want gcc to treat 72
> as a member of Enum here
The values of the enumeration type are the values in the range [0,1] so there
is no way to treat 72 as type Enum, the value is not defined.
More information about the Gcc-bugs
mailing list