[Bug c++/8218] ptype claims destructors have arg

keiths at redhat dot com sourceware-bugzilla@sourceware.org
Wed Mar 8 21:28:00 GMT 2017


https://sourceware.org/bugzilla/show_bug.cgi?id=8218

Keith Seitz <keiths at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |keiths at redhat dot com
           Assignee|unassigned at sourceware dot org   |keiths at redhat dot com

--- Comment #4 from Keith Seitz <keiths at redhat dot com> ---
(In reply to Tom Tromey from comment #3)
> Arguably it is still a gdb bug since the parameter is marked artificial.
> I think that gdb may be making an explicit choice here, though, since
> c_type_print_args explicitly prints artificial arguments.

Yeah, this just bit me, too, while trying to write some tests using
cp_test_ptype_class. It kept failing on the dtor, "~foo(int)".

The problem here is that cp_type_print_method_args doesn't ignore artificial
arguments, except possibly the first one if the method isn't static. [That
seems equally dubious to me, too. Compilers don't *have* to implement methods
using artificial `this'. :-)]

In any case, I'm working up a patch. To see ~foo(int) in 2017 is just plain
disheartening!

I don't think this should harm Clang in any way, but if there is test suite
massaging needed, I don't think there would be a problem with that.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Gdb-prs mailing list