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 middle-end/17843] Warning not given for unreachable code in a switch


------- 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


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