Subject: Re: [PATCH] Quieten arch/powerpc in a allmodconfig build.

From: Scott Wood <[email-masked]>
Date: Fri, 10 Apr 2009 13:43:11 -0500

Andreas Schwab wrote:
> Scott Wood <[email-masked]> 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