Warnings in the C++ Front-End and GCC in General

Phil Blecker tmwg@inxservices.com
Wed Sep 9 05:52:00 GMT 1998


>From a user's perspective I hear the following logic:
        We should not add a feature to turn off spurious warnings because
   the compiler should be fixed to not generate the spurious warnings.
        We do not have time, since we are all volunteers, to teach the
   compiler not to generate spurious warnings.
Such as the 'may be used uninitialized' feature that has been issuing
spurious warnings for how long now? Which is discussed here how frequently?
I would very much like to stop seeing those particular warnings in code
that I know is okay, even though I basically like the feature. I don't mind
investigating the first time to see if the compiler is correct or not. But
I get enough of them that I'm constantly checking very old code for the
umpteenth time, because I can no longer remember whether it's spurious or
not. And I don't want to take the chance that the compiler is right. So I
have comments in the code to remind me that I've already checked it, and
it's spurious, because I'm tired of doing it over and over again. But I
still have to at least look at the code for a comment that I've already
checked it. This would save me a little time and aggravation, which would
be much appreciated.
     Perhaps the fact that there is no time available to fix some warnings
should be accepted, and a way for user's to deal with that fact could be
provided until there is the time: since someone HAS found time to do that
already. I agree that it would be better not to need to use that kludge;
but the reality is that right now I either must turn off some warnings
ENTIRELY or accept the fact that I will check some spurious occurrences
over and over again whenever I've been away from some of the code I'm using
for a while. Neither is palatable, but that's the reality I've got, and
it's better than the alternatives.
     Everything can be abused. I hope you will not be swayed by the
argument that if you provide the feature the user base will abuse it.
Certainly the egcs authors can mandate that it not be used in egcs code.



More information about the Gcc mailing list