This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: other/5390: Libiberty fails to demangle multi-digit template parameters.


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>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]