DragonFly users List (threaded) for 2008-07
DragonFly BSD
DragonFly users List (threaded) for 2008-07
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: Hammer on snapshot cd's


From: Vincent Stemen <vince.dragonfly@xxxxxxxxxxx>
Date: Tue, 15 Jul 2008 19:14:15 -0500

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.




[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]