From: Scott Wood <scottwood@freescale.com>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>, linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] Quieten arch/powerpc in a allmodconfig build.
Date: Fri, 10 Apr 2009 13:03:35 -0500 [thread overview]
Message-ID: <49DF89F7.2070403@freescale.com> (raw)
In-Reply-To: <1AAD5906-66FA-4850-8C62-8C030816E44E@kernel.crashing.org>
Segher Boessenkool wrote:
>> Unfortunately -Wno-uninitialized also suppresses the warnings that point
>> to real bugs.
>
> It's a double-edged sword, yes. Warnings are always like that:
> if the compiler could know that something _is_ wrong for certain,
> it wouldn't need a warning (it would use an error, instead -- and
> it does do this in certain cases); if it would know something is
> not really wrong, it would just shut up.
The problem is that GCC does not give an error (only a warning) even for
things like this where it should be trivial to detect that the usage
*is* uninitialized, not just might be:
int foo(void)
{
int a;
return a;
}
And further, there is no separation of warning classes into
might-be-uninitialized and is-uninitialized-compiler-can-tell-for-sure.
In other words, there should be a way to tell the compiler to err on the
side of not complaining if it's unsure, but still report the obvious
ones (or make the latter an error but the former a warning). That's not
ESP or DWIM.
-Scott
next prev parent reply other threads:[~2009-04-10 18:05 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-08 4:36 [PATCH] Quieten arch/powerpc in a allmodconfig build Tony Breeds
2009-04-08 5:08 ` Michael Ellerman
2009-04-08 5:51 ` Tony Breeds
2009-04-08 6:13 ` Tony Breeds
2009-04-08 6:23 ` Michael Ellerman
2009-04-08 6:48 ` Michael Ellerman
2009-04-08 7:42 ` Geert Uytterhoeven
2009-04-08 18:47 ` Nathan Lynch
2009-04-09 0:01 ` Tony Breeds
2009-04-10 4:21 ` Nathan Lynch
2009-04-10 17:19 ` Segher Boessenkool
2009-04-09 22:46 ` Segher Boessenkool
2009-04-09 22:45 ` Tony Breeds
2009-04-09 23:11 ` Stephen Rothwell
2009-04-09 23:23 ` Segher Boessenkool
2009-04-10 18:03 ` Scott Wood [this message]
2009-04-10 18:35 ` Andreas Schwab
2009-04-10 18:43 ` Scott Wood
2009-04-10 20:28 ` Segher Boessenkool
2009-04-10 20:45 ` Segher Boessenkool
2009-04-10 21:51 ` Scott Wood
2009-04-09 23:18 ` Segher Boessenkool
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=49DF89F7.2070403@freescale.com \
--to=scottwood@freescale.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=segher@kernel.crashing.org \
--cc=sfr@canb.auug.org.au \
/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).