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: Should warnings be issued for unrecognised pragmas ?



> And how much is too much.  Personally I suspect that most programmers
> only use -Wall occaisionally to see how their source is fairing,

No, I use -Wall all the time on every build, so do many programmers.
When I take over someone else's code who was less careful, -Wall usually
finds a bug or two.

> because they are already overwhelmed by the number of warnings it
> produces, especially if they have inherited some code from somebody
> else. 

It's worth fixing the warnings.

Because large numbers of people use -Wall all the time on every build,
no warning should be added to -Wall that cannot be suppressed without
making the code worse.  Since it's easy to supress compiler-specific
pragmas belonging to other compilers with #ifdef __Green_Hills__ or
the like, I don't care in this case whether -Wall objects or not.
So -Wunrecognized_pragmas could be in -Wall.  On the other hand,
some of the "Effective C++" warnings can't be suppressed without
making some classes needlessly larger, so they can't be in -Wall.




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