https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87364

--- Comment #4 from Will Wray <wjwray at gmail dot com> ---
Thanks Martin,

I investigated enum template args with GCC bug 81932 test code,
repeating its GDB Python-debug-print test case for enum args.

Conclusion:
This change to enum printing does not cause GDB to fail to look up
non-type template specializations for enum type arguments;
the lookup succeeds and there's no missing-type Python Exception.

However, GDB still produces a warning for an RTTI lookup failure.
The warning is not serious; the type must be found some other way.

I reckon that demangling is the cause of the spurious warning.
It seems that demangle continues to output enums with C-style cast:

          template type  TreeVector<int, E::a>::Tree
           demangles as  TreeVector<int, (E)0>::Tree

Is this demangle angle a red-herring?
Is the C-style cast mandated by Itanium CXXABI for enum output?
Is demangler code even able to look up enumerators?
(I mean, does it have access to sufficient type information).

FYI I'm using #include <cxxabi.h> and abi::__cxa_demangle(name,...)
and compiling with my enum-patched-g++
(perhaps I'm picking up the system version of the abi library).

Same with clang, which has output enumerator ids for a long time
(and would normally output non-enumerated values as plain digits):
clang++ -stdlib=libc++ -lc++abi ...

Reply via email to