This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/12668] Strange warnings with -O1 -Wunreachable-code in 3.3.1,3.3.2,3.4
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Oct 2003 04:25:23 -0000
- Subject: [Bug c++/12668] Strange warnings with -O1 -Wunreachable-code in 3.3.1,3.3.2,3.4
- References: <20031018040741.12668.rmerkert@alphatech.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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).