[Bug other/46332] __cxa_demangle yields excess parentheses for function types

ian at airs dot com gcc-bugzilla@gcc.gnu.org
Tue Nov 9 19:53:00 GMT 2010


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46332

Ian Lance Taylor <ian at airs dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2010.11.09 19:53:18
                 CC|                            |bkoz at redhat dot com
         AssignedTo|unassigned at gcc dot       |ian at airs dot com
                   |gnu.org                     |
     Ever Confirmed|0                           |1

--- Comment #6 from Ian Lance Taylor <ian at airs dot com> 2010-11-09 19:53:18 UTC ---
I have a patch for this, but it breaks the libstdc++ test
testsuite/abi/demangle/abi_examples/14.cc .  That test expects _Z3fooIiFvdEiEvv
to demangle to "void foo<int, void ()(double), int>()".  With my patch it
demangles to "void foo<int, void (double), int>()".  That is, the inner "()"
goes away.  Now, clearly the inner "()" makes little sense, but I wonder
whether it should be "(*)" instead.

Ben, you added the test on 2003-02-27.  The test says it comes from the ABI
doc, but I can't find anything in the ABI doc which looks quite like this case.
 Do you recall anything about this test?  Do you think simply omitting the
inner "()" would be an appropriate demangling?



More information about the Gcc-bugs mailing list