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: Warnings in the C++ Front-End and GCC in General


Richard Hadsell wrote:

> ... Using SGI's C++ and DEC's C++ I can
> disable warnings that appear as a result of system or vendor headers,
> over which I have no control.

[and]

Klaus-Georg Adams wrote:

> I think the ability to disable warnings in the source code is very
> valuable, because often they come from system header files you can't
> change (or from a questionable default setting, like e.g. g++'s
> -Wctor-dtor-privacy). ...

The question that comes to mind here is, how often do you want to disable
warning from code that you _do_ control? I've been bitten by warnings from
system headers myself, but I prefer to remove warnings generated by my own
code by changing it, not by simply disabling the warning.

So, to begin with, why not add an option to disable all warnings from
specific headers; e.g., system headers, or all headers in a specific include
directory? As a matter of fact, I submitted a patch a few months ago which
added a -Wno-system-headers option, but it didn't make it into egcs. I think
it would be easy enough to generalize the idea, and I'd be willing to try
it.

--
Branko Cibej   <branko.cibej@hermes.si>
HERMES SoftLab, Litijska 51, 1000 Ljubljana, Slovenia
phone: (++386 61) 186 53 49  fax: (++386 61) 186 52 70




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