This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/11270] New: [tree-ssa] Strange warning with -Wunreachable-code.
- From: "reichelt at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Jun 2003 18:45:17 -0000
- Subject: [Bug c/11270] New: [tree-ssa] Strange warning with -Wunreachable-code.
- 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=11270
Summary: [tree-ssa] Strange warning with -Wunreachable-code.
Product: gcc
Version: unknown
Status: UNCONFIRMED
Keywords: diagnostic
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: reichelt@gcc.gnu.org
CC: dnovillo@gcc.gnu.org,gcc-bugs@gcc.gnu.org
GCC host triplet: i686-pc-linux-gnu
This is actually the same bug as in PR8828, but this time for the
tree-ssa-branch (as of 20030620). Compiling the following code with
"gcc -Wunreachable-code -c"
-------------------------------------------
void foo(int i)
{
switch(i)
{
case 0:
break;
case 1:
break;
}
}
-------------------------------------------
I get the following strange warning:
warn.c: In function `void foo(int)':
warn.c:7: warning: will never be executed
warn.c:4: warning: will never be executed