All of lore.kernel.org
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: Andreas Schwab <schwab@linux-m68k.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:43:11 -0500	[thread overview]
Message-ID: <49DF933F.7030101@freescale.com> (raw)
In-Reply-To: <m2bpr4l5m0.fsf@igel.home>

Andreas Schwab wrote:
> Scott Wood <scottwood@freescale.com> writes:
> 
>> 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;
>> }
> 
> The compiler must not reject this code, because the undefined behavior
> only occurs if executed.  There is no constraint violated.

Fine (though GCC could have something similar to -Werror but more 
limited in scope to the really serious stuff that *should* be illegal 
even if it isn't), but it should at least be a separate warning class.

My point was to counter Segher's assertion that the compiler currently 
gives an error on the obvious stuff.

-Scott

  reply	other threads:[~2009-04-10 18:44 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
2009-04-10 18:35               ` Andreas Schwab
2009-04-10 18:43                 ` Scott Wood [this message]
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=49DF933F.7030101@freescale.com \
    --to=scottwood@freescale.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=schwab@linux-m68k.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 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.