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 c/11270] New: [tree-ssa] Strange warning with -Wunreachable-code.


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


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