public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <law@redhat.com>
To: Xinliang David Li <davidxl@google.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: new option -Wno-maybe-uninitialized
Date: Mon, 25 Apr 2011 22:24:00 -0000	[thread overview]
Message-ID: <4DB5E9BE.7090205@redhat.com> (raw)
In-Reply-To: <BANLkTin6g2nCK8tN0voH8d3sdWY8FyeyYA@mail.gmail.com>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 04/21/11 11:43, Xinliang David Li wrote:

> 
> There are three different kind of uninit warnings:
> 
> 1) definitely uninitialized, and the use the variable dominates the
> exit -- this is the must be used uninitialized case
> 2) definitely uninitialized, but the use may not be executed at runtime;
> 3) Only initialized in some paths from entry to the use (the use may
> or may not be executed).
> 
> Currently 2) and 3) uses the same warning message, which may be misleading.
> 
> The proposed new option only controls  3).
It's certainly possible to have an uninitialized use dominating an exit
which can never be executed (think infinite loop which can't be detected
at compile time.

I bring these issues up primarily to get us thinking about how better to
describe the scenarios where we warn in our documentation.  I don't want
to hold up real improvements.


> 
>> No, the patch does not change the default behavior of -Wuninitialized
>> wihch will turn on -Wmaybe-uninitialized as well. The only useful
>> scenarios for the new option are:
OK.  I must have misread something.


Given the fact that your patch isn't changing the -Wuninitialized
behaviour, then let's go ahead with your patch.

Jeff
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJNtem+AAoJEBRtltQi2kC7f54IALq8+i2dtRw2z/r6rKYX6+JD
u0eraT4+U5q58ZQQZeU05eBKv4P3Soq14z4/RuuM7dTuU44fqOKz4IrvAxUmnm9f
pdQy4OWHs1/vMR/04JdYy2IjDNbx9tRADioD4VvgrvfBSYHhZvLTJHg5ggAmk2eS
S1Dd1tnKrfn/h0Bz3wqwNDblAQT2TzUvYRcBEq+iTzBQWbrkCCKLr+rWIxEeCDGn
679hkhiFeUYcoFSvYIXc54YCYWCjWsdj5n3Fg9ex7IWGblvfjPejUfq//Xr2wq0J
jlDfuo3mDoDEgLxQ94RRMeHYf7kwCRhwiYqul/U2Fg7UOHlci2aWKpCfHEdY5VI=
=no9V
-----END PGP SIGNATURE-----

      parent reply	other threads:[~2011-04-25 21:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-08  0:24 Xinliang David Li
2011-04-21 17:40 ` Jeff Law
2011-04-21 19:15   ` Xinliang David Li
2011-04-22 10:34     ` Richard Guenther
2011-04-22 17:11       ` Xinliang David Li
2011-04-22 17:19       ` Gabriel Dos Reis
2011-04-22 18:12         ` Xinliang David Li
2011-04-25 22:24     ` Jeff Law [this message]

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=4DB5E9BE.7090205@redhat.com \
    --to=law@redhat.com \
    --cc=davidxl@google.com \
    --cc=gcc-patches@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).