This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: annoying warning generated
- To: jason at cygnus dot com
- Subject: Re: annoying warning generated
- From: Mark Mitchell <mark at markmitchell dot com>
- Date: Mon, 31 Aug 1998 16:38:45 -0700
- CC: karsten at phy dot hw dot ac dot uk, egcs-bugs at cygnus dot com
- References: <13802.35442.700684.97684.cygnus.egcs.bugs@phyw164.phy.hw.ac.uk> <u93eadgcff.fsf@yorick.cygnus.com>
- Reply-to: mark at markmitchell dot com
>>>>> "Jason" == Jason Merrill <jason@cygnus.com> writes:
>>>>> Karsten Ballueder <karsten@phy.hw.ac.uk> writes:
>> Compiling with "-Wall" now produces endless lists of compiler
>> warnings about the private destructor. That's probably a good
>> idea for most cases, but there seems to be no possibility to
>> switch this warning off - that's the "bug" I was mentioning.
>> IMHO there really should be an option to disable this warning.
Jason> Actually, I'm not sure it does make sense for most cases;
Jason> in cases where it might be useful, any attempted use of the
Jason> class would fail, which seems like an adequate diagnostic.
Jason> So feel free to remove it and send a patch to egcs-patches.
Jason> Just search for the warning text with grep.
I (slightly) disagree. In a past life of building error-checking
tools, we found that it was sometimes useful to be able to warn about
things like this when a class was designed, rather than it was used.
It's not a *big* deal, but think Karsten's suggestion is better; we
need, eventually, to find a way to control individual warnings. Then,
all we have to argue for is sensible defaults... :-(
In the short term, disabling this warning might be the way to go.
Perhaps it should be `if (0)'. This will make sure that the code
continues to compile (as opposed to `#if 0', which is more likely to
lead to bit-rot...).
Jason> Jason
--
Mark Mitchell mark@markmitchell.com
Mark Mitchell Consulting http://www.markmitchell.com