Hammer on snapshot cd's
    Vincent Stemen 
    vince.dragonfly at hightek.org
       
    Tue Jul 15 17:20:18 PDT 2008
    
    
  
On Wed, Jul 16, 2008 at 12:35:38AM +0100, Simon 'corecode' Schubert wrote:
> Matthew Dillon wrote:
>>    One interesting thing I've found on GCC-4 is that the callgraph 
>> analyzer
>>    will cross procedure boundaries for all procedures in that particular
>>    source file.  It can actually detect that error is left uninitialized
>>    in this situation:
>>     cc -Wall x.c -c -O2
>>     x.c: In function 'fubar2':
>>     x.c:16: warning: 'error' is used uninitialized in this function
>>     (edit so *valuep is set to 0)
>>     cc -Wall x.c -c -O2
>>     (no warning reported)
>
> So you need to go -O2?  -O alone doesn't work?  Maybe we should -O2 after 
> the release then :)
I just tested with the same piece of code I was discussing earlier with
gcc 3.4.6 and "-Wall -O" did produce the "... might be used
uninitialized in this function" warnings.  So apparently -O2 is not
necessary.
    
    
More information about the Users
mailing list