This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Uninitialized warnings


On Tuesday, July 17, 2001, at 03:33 PM, Carlo Wood wrote:

> On Tue, Jul 17, 2001 at 09:51:06AM -0700, Dale Johannesen wrote:
>> we're the first people to think of this, which gives me pause.  Is a
>> patch that checks for uninitalized variables even without optimization
>> likely to be accepted?
>
> Please don't add any warning that can generate false positives.
> I'd rather have no warning at all for 100 actual bugs than
> 100 correct warnings and a false positive. [...]

I think there's some confusion here.  What Dale is getting at
is that -Wuninitialized is basically useless without -O<something>,
so why not make -Wuninitialized turn on enough dataflow analysis
to be meaningful, but without letting it alter the output?  In other
words, fix -Wuninitialized, even it means making the compiler run
a little more slowly when the flag is on.

The current documented behavior just seems lame to me, one of
those snake-pit-in-the-middle-of-the-living-room-floor traditional
things that don't make any sense to an objective observer.

Stan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]