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


<<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.  The reason for
that is that I always use -Werror: I want gcc to abort when
a warning is generated.  The reason for THAT is that a warning
always means that something *is* wrong and will (likely) cause
a runtime error.
>>

I strongly disagree with this point of view. Any warning by its nature
may have false positives, you are after all dealing with legal code with
a well defined meaning, you are just guessing that it is not the intended
meaning, but you cannot be sure your guess is correct.

Obviously you don't want too many false positives, but the 100-1 suggestion
here is way off the reasonable compromise point.

<<If I'd have to suggest an alternative/compromise, then I'd say:
make it possible to temporally turn off a specific warning in
the source code.
>>

In GNAT, we have added pragma Warnings (On | Off); to handle this problem
when it occasionally arises, since it is a requirement of the GNAT build
that no warnings are generated


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