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


<<Believe it or not, I agree with you, but I'm definitely in a small
minority (1?) around here.  Is there a consensus on how the
uninitialized-variable check should behave?
>>

A bug that is found by examining a warning at compile time represents a huge
cost savings over having to find this same bug during unit testing, system
integration testing, or worse, not finding it at all and having it cause
damage after deployment.

That means to me that one is willing to tolerate quite a few false positives
to find one real bug at compile time.

I do agree that you need a way to selectively turn off warnings so that
sources can be kept clean.

A specific case in point is that when we first ran the GNAT sources through
GCC 3.x, we got about 60 warnings about possibly uninitialized variables.
Six of these were definite bugs, and one of them was a potentially serious
bug. Going through those 60 warnings to find that potentially serious bug
*before* it caused someone trouble was *well* worth the effort.


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