This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/54140] -Wswitch shouldn't complain about out-of-range values that are cast to the correct type


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]