This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: PATCH: Wno-warning-directives [WasRe: cpplib: Start moving ...]


On Monday, August 12, 2002, at 04:42  PM, Richard Henderson wrote:

On Mon, Aug 12, 2002 at 04:08:57PM -0700, Devang Patel wrote:
It was a long thread. But just like we have an option to disable
warnings from system header, somebody may need an options to
disable #warning messages.
I'm not particularly friendly to this option.

Warnings from the compiler are something over which you have less
control, whereas you have complete control over warning directives.

If the argument is that this warning comes from third-party header
files, the counter-argument is that the third party probably put
it in there for a reason, and that if you ignore the warning you
may well not understand the input constraints of the package.

What if it is coming from system headers ?

If someone is going to go to this extreme to ignore warnings, IMO
they can bloody well turn them all off with "-w".
For a normal application developer, a warning generated by compiler
and message from warning directives from system header are same in the sense
that he does not have control over it. At the same time user does
not want to use -w and use -Werror to take care and fix his own
warnings.

User can use -Wno-system-headers to mask system header warnings in this
situation, but it does not cover #warning. Hence this new option.

-Devang


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