PATCH: Testcase for new C++ bug? Comments please.
Carlo Wood
carlo@runaway.xs4all.nl
Fri Jul 3 00:50:00 GMT 1998
| 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;
More information about the Gcc
mailing list