public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
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	[thread overview]
Message-ID: <20010611001715.14179.qmail@sourceware.cygnus.com> (raw)

>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:


             reply	other threads:[~2001-06-10 17:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-10 17:26 carlo [this message]
2001-06-15  9:36 Carlo Wood
2002-04-26  3:33 nathan
2003-02-26 18:11 bkoz
2003-02-27 19:31 bkoz
2003-02-27 23:06 Carlo Wood
2003-02-28  0:11 neroden

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010611001715.14179.qmail@sourceware.cygnus.com \
    --to=carlo@alinoe.com \
    --cc=gcc-gnats@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).