[Bug c++/54140] -Wswitch shouldn't complain about out-of-range values that are cast to the correct type
ayg at aryeh dot name
gcc-bugzilla@gcc.gnu.org
Tue Jul 31 16:18:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54140
--- Comment #3 from Aryeh Gregor <ayg at aryeh dot name> 2012-07-31 16:18:14 UTC ---
Yeah, sorry, it was a bad example. Assigning 72 to this enum is undefined, so
maybe this behavior is justifiable. The real-world example I was looking at
didn't have that issue, though -- feel free to use A = 72 or something if you
like.
More information about the Gcc-bugs
mailing list