This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/54140] -Wswitch shouldn't complain about out-of-range values that are cast to the correct type
- From: "ayg at aryeh dot name" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 31 Jul 2012 16:18:14 +0000
- Subject: [Bug c++/54140] -Wswitch shouldn't complain about out-of-range values that are cast to the correct type
- Auto-submitted: auto-generated
- References: <bug-54140-4@http.gcc.gnu.org/bugzilla/>
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.