[Bug c/11270] New: [tree-ssa] Strange warning with -Wunreachable-code.
reichelt at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Jun 20 18:45: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=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
More information about the Gcc-bugs
mailing list