[Bug middle-end/17843] Warning not given for unreachable code in a switch
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Tue Oct 5 18:04:00 GMT 2004
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-05 18:04 -------
This is because switches are not optimizated as much as ifs or anything else is. The warning which
Wolfgang gives is a different bug which is already filed.
Note the tree which are generated is "(int) (x != 0)" so we are switching on that but the middle-end
does not produce good RTL for that to optimize right.
--
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
Component|c++ |middle-end
Keywords| |diagnostic
Summary|Warning not given. |Warning not given for
| |unreachable code in a switch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17843
More information about the Gcc-bugs
mailing list