From mboxrd@z Thu Jan 1 00:00:00 1970 From: carlo@alinoe.com To: gcc-gnats@gcc.gnu.org Subject: c++/3111: Demangler in libiberty.a is broken Date: Sun, 10 Jun 2001 17:26:00 -0000 Message-id: <20010611001715.14179.qmail@sourceware.cygnus.com> X-SW-Source: 2001-06/msg00387.html List-Id: >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: