This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: other/5390: Libiberty fails to demangle multi-digit template parameters.
- From: Carlo Wood <carlo at alinoe dot com>
- To: nobody at gcc dot gnu dot org
- Cc: gcc-prs at gcc dot gnu dot org,
- Date: 16 Jan 2002 04:26:01 -0000
- Subject: Re: other/5390: Libiberty fails to demangle multi-digit template parameters.
- Reply-to: Carlo Wood <carlo at alinoe dot com>
The following reply was made to PR other/5390; it has been noted by GNATS.
From: Carlo Wood <carlo@alinoe.com>
To: Hans-Peter Nilsson <hp@bitrange.com>
Cc: gcc-patches@gcc.gnu.org, dj@redhat.com, gcc-gnats@gcc.gnu.org
Subject: Re: other/5390: Libiberty fails to demangle multi-digit template parameters.
Date: Wed, 16 Jan 2002 05:16:21 +0100
On Tue, Jan 15, 2002 at 10:59:00PM -0500, Hans-Peter Nilsson wrote:
> IIRC, this is because of blessed backward-compatibility. Names
> mangled with earlier GCC releases (earlier than gcc-2.95) are
> supposed to be demanglable (when at all possible). If you have
> checked this, please say so. Maybe it's not important any
> longer.
I didn't check compilers older than 2.95. But even if this patch
would break demangling for those older compilers, then it seems
more important to me to have 2.95 working and older broken then
vica versa. It is not possible to support both.
That last remark is based on the following logic: When decoding
integers as <digit>[<digit>...] would break something, then
apparently the older compilers will generate mangled names
like: "__FGt3Bar1i21i" demanding that you treat the "i2" as
a single digit integer (resulting: f(Bar<2>, i)).
But g++-2.95 will generate "__FGt3Bar1i21i" for f(Bar<21>, int)
and hence it is impossible to support both. I'd say:
demangle "__FGt3Bar1i21i" as f(Bar<21>, int) ...
--
Carlo Wood <carlo@alinoe.com>