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



Martin von Loewis (martin@mira.isdn.cs.tu-berlin.de) writes:

> > Note that I can easily envision new language constructs that would
> > have the same effect, but not violate the above elements of my
> > framework.
> 
> I don't understand the desire for new language constructs. If one has
> to change sources and header files anyway, one could just fix the code
> instead of disabling the warning in many cases.
> 
> Mark's facility is really for people who get hundreds of identical
> warnings, and want to shut up all of them.

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). If you have a class which has only private ctors
and dtors (a singleton), you could disable the warning in the header
with the classes declaration, which shuts it up for all users of that
header, but not for other compilation units. In the present situation
all you can do is to turn it off for all objects in the Makefile.

-- kga
-------------------------------------------------------------------------
Klaus-Georg Adams        Email: Klaus-Georg.Adams@chemie.uni-karlsruhe.de
Institut f. Anorg. Chemie, Lehrstuhl II            Tel: 49(0)721 608 3485
Universität Karlsruhe, D-76128 Karlsruhe
-------------------------------------------------------------------------


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