Re: [RFC] Special casing dtors?

Daniel Jacobowitz
2009-03-27T02:22:01Z

On Wed, Mar 25, 2009 at 03:33:29PM -0700, Keith Seitz wrote:
> Hi,
>
> I've been looking a bit at a patch (in Fedora) which fixes prms/1112, and
> I notice that both valops.c and linespec.c treat destructors as "special
> case"s -- but nowhere does it say WHY.
>
> I've searched through all the history I can find about this (including
> the Cygnus internal ueberbaum), and all I've been able to discover is
> that this has been in a LONG time (before 1990).
>
> So out of curiosity, I removed all those special cases, and lo! There
> were no new failures, and one new pass in the testsuite (on x86, CVS
> HEAD).
>
> Can anyone explain to me either why gdb treats dtors differently from
> "normal" methods or why we shouldn't commit something like the attached
> patch?

I remember, about five years ago, doing some serious surgery on the
way the stabs reader reported constructors and destructors. If I had
to guess, I'd say this code was needed before that and/or for GCC 2.x.
But 2.x is pretty scarce on the ground nowadays anyway. Either that,
or something for HP aCC.

Anyway, good riddance if your patch works! What's the new PASS?

--
Daniel Jacobowitz
CodeSourcery