c++/3111: Demangler in libiberty.a is broken
carlo@alinoe.com
carlo@alinoe.com
Sun Jun 10 17:26:00 GMT 2001
>Number: 3111
>Category: c++
>Synopsis: Demangler in libiberty.a is broken
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Jun 10 17:26:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Carlo Wood
>Release: 3.0
>Organization:
>Environment:
>Description:
A qualifier 'K' results rather stupidly in a 'const'
being appended to whatever the following type. The
demangler doesn't take into account that types exist
of a 'prefix' and a 'postfix' part, where the 'const'
needs to be added in between.
Example:
/usr/src/gcc/gcc-cvs-3.0/libiberty>gcc-3.0 -DSTANDALONE_DEMANGLER -I../include cp-demangle.c dyn-string.c xmalloc.c xexit.c -o c++filt
cp-demangle.c: In function `demangle_char':
cp-demangle.c:968: warning: assignment makes pointer from integer without a cast
/usr/src/gcc/gcc-cvs-3.0/libiberty>./c++filt _Z1fKPFiiE
f(int (*)(int) const)
Which should have been
f(int (* const)(int))
This could be considered as a regression from 2.95.3
as this does handle the 'C' qualifier correctly.
For example:
/usr/src/gcc/gcc-2.95.3/libiberty>../../gcc-2.95.3-objdir/gcc/c++filt __1ACPFi_i
A::A(int (*const)(int))
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list