Bug 65545

Summary: Demangling of char template parameters always produces integer value
Product: gcc Reporter: Colin Hirsch <gcc>
Component: demanglerAssignee: Not yet assigned to anyone <unassigned>
Status: NEW ---    
Severity: normal CC: manu, webrown.cpp
Priority: P3    
Version: 4.9.2   
Target Milestone: ---   
Host: Target:
Build: Known to work:
Known to fail: Last reconfirmed: 2016-01-24 00:00:00

Description Colin Hirsch 2015-03-24 20:37:31 UTC
Given a template class declared with a "char" template parameters, for example

   template< char ... C > struct one;

and demangling the class name of an instance like

   one< 'a' >

with the abi::__cxa_demangle() function then the demangled result is

   one<(char)97>

which is much harder to read...

It would be great if this could be fixed to print 'c' whenever isprint() is true for the value of c.

Thanks!
Comment 1 Andrew Pinski 2016-01-24 19:05:01 UTC
demangler is part of libgcc.

Confirmed.
Comment 2 jsm-csl@polyomino.org.uk 2016-01-25 23:44:40 UTC
No, it's part of libiberty.