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: PATCH: Testcase for new C++ bug? Comments please.


| 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;


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