qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paul Brook <paul@codesourcery.com>
To: qemu-devel@nongnu.org
Cc: Laurent Desnogues <laurent.desnogues@gmail.com>,
	Anthony Liguori <aliguori@us.ibm.com>,
	"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] move -Wno-error=uninitialized to configure
Date: Tue, 30 Jun 2009 13:44:31 +0100	[thread overview]
Message-ID: <200906301346.38466.paul@codesourcery.com> (raw)
In-Reply-To: <20090630121613.GB1227@redhat.com>

On Tuesday 30 June 2009, Michael S. Tsirkin wrote:
> On Tue, Jun 30, 2009 at 03:12:40PM +0300, Michael S. Tsirkin wrote:
> > On Tue, Jun 30, 2009 at 01:07:34PM +0100, Paul Brook wrote:
> > > On Tuesday 30 June 2009, Michael S. Tsirkin wrote:
> > > > Move -Wno-error=uninitialized out of rules.mak and into configure.
> > > > Only use it if supported by compiler.
> > >
> > > Why? Shouldn't we be fixing the uninitialized variables?
> > >
> > > Paul
> >
> > gcc's algorithm for detecting uninitialized variables is
> > famously unreliable. Just scattering '= 0' around the code
> > masks the warning but hides the fact that application logic
> > might still be broken.
>
> To clarify: what's broken is that gcc has false positives in the logic.
> And if you work around this by adding initialization where it's not
> really required, you confuse other tools that would otherwise have a
> chance to detect an error.

In that case should we be using -Wno-uninitialized?

The whole point of -Werror is that it forces us to keep the code clean. Having 
to mentally filter out false positives just doesn't work. Once you have 
routinely expected warnings then people stop checking for new ones.

Paul

  reply	other threads:[~2009-06-30 12:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-30 11:39 [Qemu-devel] [PATCH] move -Wno-error=uninitialized to configure Michael S. Tsirkin
2009-06-30 12:07 ` Paul Brook
2009-06-30 12:12   ` Michael S. Tsirkin
2009-06-30 12:16     ` Michael S. Tsirkin
2009-06-30 12:44       ` Paul Brook [this message]
2009-06-30 12:58         ` Michael S. Tsirkin
2009-06-30 15:22           ` Stuart Brady
2009-06-30 12:30   ` Avi Kivity

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=200906301346.38466.paul@codesourcery.com \
    --to=paul@codesourcery.com \
    --cc=aliguori@us.ibm.com \
    --cc=laurent.desnogues@gmail.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.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 NNTP newsgroup(s).