public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c/8828: [3.2/3.3 regression] gcc reports some code is unreachable  when it is not
@ 2002-12-24 12:36 Janis Johnson
  0 siblings, 0 replies; only message in thread
From: Janis Johnson @ 2002-12-24 12:36 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c/8828; it has been noted by GNATS.

From: Janis Johnson <janis187@us.ibm.com>
To: gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org, rcampbell@tropicnetworks.com,
   gcc-bugs@gcc.gnu.org, nobody@gcc.gnu.org
Cc:  
Subject: Re: c/8828: [3.2/3.3 regression] gcc reports some code is unreachable 
 when it is not
Date: Tue, 24 Dec 2002 12:28:20 -0800

 The regression reported in PR c/8828 showed up starting
 with this patch:
 
 2002-02-12  Jakub Jelinek  <jakub@redhat.com>
 
         * jump.c (never_reached_warning): Add finish argument.
         If finish is NULL, stop on CODE_LABEL, otherwise stop before
 first
         real insn after end.
         * rtl.h (never_reached_warning): Adjust prototype.
         * cse.c (cse_insn): Pass NULL as finish to
 never_reached_warning.
         * cfgrtl.c (flow_delete_block): Pass b->end as finish to
         never_reached_warning.
 
 Here's a small test case that causes the compiler to issue
 warnings when compiled on i686-linux with -Wunreachable-code:
 
 -------------------
 /* incorrect(?) warnings with -Wunreachable-code */
 
 void foo(int i) {
   switch (i)    {
     case 0:         break;
     case 1:         break;
   };
 };
 -------------------
 
 Output from mainline gcc:
 
 8828.c: In function `foo':
 8828.c:6: warning: will never be executed
 8828.c:5: warning: will never be executed
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8828
 
 
 


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-12-24 20:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-24 12:36 c/8828: [3.2/3.3 regression] gcc reports some code is unreachable when it is not Janis Johnson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).