This is the mail archive of the gcc-prs@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]

Re: c/8828: gcc reports some code is unreachable when it is not


Synopsis: gcc reports some code is unreachable when it is not

State-Changed-From-To: open->analyzed
State-Changed-By: reichelt
State-Changed-When: Fri Dec  6 01:29:11 2002
State-Changed-Why:
    Confirmed.
    
    An even shorter example is the following:
    
    -----------------snip here----------------
    void foo(int i)
    {
      switch(i) {
        case 0:
          break;
        case 1:
          break;
      }
    }
    -----------------snip here----------------
    
    Compiling this with gcc 3.2.1 or mainline I get the message
    
    PR8828.c: In function `foo':
    PR8828.c:7: warning: will never be executed
    PR8828.c:5: warning: will never be executed
    
    i.e. the compiler complains about the "break" statements.
    
    This is a regression from gcc 3.0.4 where the warning is not issued.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8828


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