public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "manu at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/54554] Undetected use of uninitialized variable
Date: Fri, 04 Jan 2013 12:50:00 -0000	[thread overview]
Message-ID: <bug-54554-4-86gSCOoX4U@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-54554-4@http.gcc.gnu.org/bugzilla/>


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54554

--- Comment #5 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2013-01-04 12:49:39 UTC ---
(In reply to comment #4)
> Still even without knowing that a "may be used uninitialized" warning can be
> issued in any case.

GCC does not warn if it can prove that the code is never executed. But it
doesn't even try to prove that without optimization enabled, so it doesn't
warn. Otherwise, it would warn for obvious things like:

int d;
if (0) return d;

and people will complain.


  parent reply	other threads:[~2013-01-04 12:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-12  9:16 [Bug c/54554] New: " dpapavas at gmail dot com
2012-09-12  9:47 ` [Bug c/54554] " rguenth at gcc dot gnu.org
2012-09-12 10:19 ` dpapavas at gmail dot com
2013-01-04 10:28 ` manu at gcc dot gnu.org
2013-01-04 12:41 ` dpapavas at gmail dot com
2013-01-04 12:50 ` manu at gcc dot gnu.org [this message]
2013-01-04 14:50 ` dpapavas at gmail dot com
2014-04-09 10:49 ` mpolacek at gcc dot gnu.org
2014-04-09 11:04 ` manu at gcc dot gnu.org
2014-04-10  7:12 ` dominik.muth at gmx dot de
2022-08-29 13:46 ` [Bug tree-optimization/54554] fails to warn for uninitialized var within loop always taken at -O0 rguenth at gcc dot gnu.org

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=bug-54554-4-86gSCOoX4U@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).