annoying warning generated

Mark Mitchell mark@markmitchell.com
Mon Aug 31 16:36:00 GMT 1998


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



More information about the Gcc-bugs mailing list