public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: duchier@ps.uni-sb.de
To: gcc-gnats@gcc.gnu.org
Subject: c++/7827: incorrect warning "will never be executed" when optimizing
Date: Wed, 04 Sep 2002 09:46:00 -0000	[thread overview]
Message-ID: <20020904164303.3612.qmail@sources.redhat.com> (raw)


>Number:         7827
>Category:       c++
>Synopsis:       incorrect warning "will never be executed" when optimizing
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Sep 04 09:46:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     duchier@ps.uni-sb.de
>Release:        3.2.1 20020904 (prerelease)
>Organization:
>Environment:
System: Linux speedy 2.4.18-5 #1 Mon Jun 10 15:31:48 EDT 2002 i686 unknown
Architecture: i686
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../gcc-3_2-branch/configure --enable-languages=c,c++ --prefix=/home/denys/src/GNU/GCC/install-3_2
>Description:
compiler issues incorrect warning about unreachable code (when
-O is supplied).  I don't know if it actually incorrectly deletes
code that it thinks is unreachable.
>How-To-Repeat:
Executing:
   c++ -O -Wunreachable-code -c foo.cc 
Prints:
   foo.cc: In function `bool foo(Node*)':
   foo.cc:11: warning: will never be executed
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/x-c++src; name="foo.cc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="foo.cc"

Y2xhc3MgTm9kZSB7CnByaXZhdGU6CiAgYm9vbCBmbGFnOwpwdWJsaWM6CiAgTm9kZShib29sIGYp
OmZsYWcoZil7fQogIGJvb2wgaXNFbXB0eSgpIHsgcmV0dXJuIGZsYWc7fQp9OwoKYm9vbCBmb28o
Tm9kZSpwMSkgewogIHdoaWxlIChwMSkKICAgIGlmIChwMS0+aXNFbXB0eSgpKQogICAgICByZXR1
cm4gdHJ1ZTsKICByZXR1cm4gZmFsc2U7Cn0K


             reply	other threads:[~2002-09-04 16:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-04  9:46 duchier [this message]
2002-09-13  9:45 nathan
2003-05-09  1:12 bangerth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020904164303.3612.qmail@sources.redhat.com \
    --to=duchier@ps.uni-sb.de \
    --cc=gcc-gnats@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).