This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: Testcase for new C++ bug? Comments please.
- To: martin at mira dot isdn dot cs dot tu-berlin dot de
- Subject: Re: PATCH: Testcase for new C++ bug? Comments please.
- From: Klaus-Georg Adams <Klaus-Georg dot Adams at chemie dot uni-karlsruhe dot de>
- Date: Fri, 3 Jul 1998 12:13:09 +0200
- CC: carlo at runaway dot xs4all dot nl, egcs at cygnus dot com
>>>>> "Martin" == Martin von Loewis <martin@mira.isdn.cs.tu-berlin.de> writes:
>> But what if you want to see that warning for other objects?
Martin> Just compile a single file with this flag.
This won't help you, because the warning is given in every file which
#include's the interface of the singleton (and you would have to chase
them all in the Makefile). Not a realistic option. If you have a
single header which causes this warning, you have to turn it off for
the entire compilation.
It is not a #pragma that is needed (although it would help to kludge
around the problem), but the warning has to be fixed. It makes sense
to warn about a class that is completely inaccesible. But this is not
the case here.
Note: I don't know the internals of gcc, but if it can check for
private ctor and dtors, it could just as well check for static public
functions returning an object of the offending class.
-- 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
-------------------------------------------------------------------------