[Bug c++/12668] Strange warnings with -O1 -Wunreachable-code in 3.3.1,3.3.2,3.4

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sat Oct 18 04:29:00 GMT 2003


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12668


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |diagnostic
   Last reconfirmed|0000-00-00 00:00:00         |2003-10-18 04:25:22
               date|                            |


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-10-18 04:25 -------
-O1 enables inlining so that foo is inlined and the warning is right when x is always 0 because that 
line is never executed in the line version.
What is wrong is when you enable line 10, it says that line 2 is never executed twice. It should 
never tell you that line 2 is not executed at all (because there is no code assocated with it).



More information about the Gcc-bugs mailing list