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 (Martin von Loewis), Klaus-Georg dot Adams at chemie dot uni-karlsruhe dot de
- Subject: Re: PATCH: Testcase for new C++ bug? Comments please.
- From: Carlo Wood <carlo at runaway dot xs4all dot nl>
- Date: Fri, 3 Jul 1998 02:58:01 +0200 (CEST)
- Cc: egcs at cygnus dot com (egcs at cygnus dot com)
| The warning as worded is technically correct; and a compliant
| implementation is free to produce whatever messages it likes.
|
| It may be annoying; you can use -Wno-ctor-dtor-privacy to shut it up.
I can't resist :). This is a nice example of why a #pragma
is favourable to turn off warnings.
When someone insists on having NO warnings, and hence uses
-Werror in order to stop the compilation of 30 minutes
whenever a warning happens - then indeed this single singleton
would force you to use -Wno-ctor-dtor-privacy.
But what if you want to see that warning for other objects?
Then there is a need to turn the warning off for just that one class.
--
Carlo Wood <carlo@runaway.xs4all.nl>
PS In the meantime you might be helped by using the trick to
add a dummy friend class :)
friend class yeah_sure;