From: "Michael S. Tsirkin" <mst@redhat.com>
To: Paul Brook <paul@codesourcery.com>
Cc: Laurent Desnogues <laurent.desnogues@gmail.com>,
Anthony Liguori <aliguori@us.ibm.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] move -Wno-error=uninitialized to configure
Date: Tue, 30 Jun 2009 15:58:49 +0300 [thread overview]
Message-ID: <20090630125849.GA10413@redhat.com> (raw)
In-Reply-To: <200906301346.38466.paul@codesourcery.com>
On Tue, Jun 30, 2009 at 01:44:31PM +0100, Paul Brook wrote:
> 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
That's what -Wno-error=uninitialized does: makes the filtering
automatically so you don't need to filter it mentally.
--
MST
next prev parent reply other threads:[~2009-06-30 13:01 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
2009-06-30 12:58 ` Michael S. Tsirkin [this message]
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=20090630125849.GA10413@redhat.com \
--to=mst@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=laurent.desnogues@gmail.com \
--cc=paul@codesourcery.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.