public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "mi+gcc at aldan dot algebra.com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/42643] "may be used uninitialized" compiled with "-Wall -O"
Date: Fri, 06 Jan 2012 20:09:00 -0000	[thread overview]
Message-ID: <bug-42643-4-VYu0JqrT9Z@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-42643-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #2 from mi+gcc at aldan dot algebra.com 2012-01-06 20:08:54 UTC ---
Created attachment 26259
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26259
Live test case (file from Mozilla's NSS package)

Even when using gcc-4.6 (more specifically gcc version 4.6.3 20111104
(prerelease) (FreeBSD Ports Collection)), I still get a bogus warning on the
attached file, unless the optimization level is at -O3 AND the -fPIC is not
specified:

mi@narawntapu:nss/lib/util (1778) gcc46 -Wall -O3 -c nssb64e.i
mi@narawntapu:nss/lib/util (1779) gcc46 -Wall -O2 -c nssb64e.i
nssb64e.i: In function 'NSSBase64_EncodeItem_Util':
nssb64e.i:3239:15: warning: 'out_len' may be used uninitialized in this
function [-Wuninitialized]
mi@narawntapu:nss/lib/util (1780) gcc46 -Wall -O3 -fPIC -c nssb64e.i
nssb64e.i: In function 'NSSBase64_EncodeItem_Util':
nssb64e.i:3239:15: warning: 'out_len' may be used uninitialized in this
function [-Wuninitialized]


       reply	other threads:[~2012-01-06 20:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-42643-4@http.gcc.gnu.org/bugzilla/>
2012-01-06 20:09 ` mi+gcc at aldan dot algebra.com [this message]
2012-12-28 21:27 ` steven at gcc dot gnu.org
2010-01-07  0:48 [Bug c/42643] New: " numidee at synopsys dot com
2010-04-21  0:29 ` [Bug c/42643] " davidxl at gcc dot gnu dot 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-42643-4-VYu0JqrT9Z@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).