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: c++/5390: Libiberty fails to demangle multi-digit template parameters.


On Mon, Mar 10, 2003 at 03:03:05PM -0600, Wolfgang Bangerth wrote:
> >  So, as far as I am concerned you can close this PR.
> 
> Does this still hold given DJ's mail?
> 
> > (Personally, I'd fix it though if I were you - but I am a perfectionist).
> 
> I might if I could. I have no knowledge of gcc, libiberty, etc at all. My 
> place is gnats, beyond that I can only try to get patch creators and 
> reviewers into contact -- usually a fruitless endeavor...

I tested it again and, as I've written to DJ in private, it seems
that my patch WAS applied more or less to gcc version 3.1.
However, the way it is now is that it doesn't work for negative
template integrals less than -9.

For example:

/usr/src/gcc/gcc-cvs-3.3/libiberty>echo 'main(int argc, char* argv[]) { printf("%s\n", cplus_demangle(argv[1], 3)); }' > main.c
/usr/src/gcc/gcc-cvs-3.3/libiberty>gcc -I../include cplus-dem.c safe-ctype.c xmalloc.c xexit.c xstrdup.c cp-demangle.c dyn-string.c main.c
/usr/src/gcc/gcc-cvs-3.3/libiberty>a.out X__FGt3Bar1im10i
X(Bar<-1>, , int)

I corrected cplus-dem.c again to completely reflect my original patch
after which I get correctly:

/usr/src/gcc/gcc-cvs-3.3/libiberty>a.out X__FGt3Bar1im10i
X(Bar<-10>, int)


The new diff is attached.

Log entry:


2003-03-10  Carlo Wood  <carlo at gnu dot org>

        * cplus-dem.c (demangle_integral_value): Correction to reflect
	patch of 2002-01-10 in order to also make negative multi-digits
	without leading underscore work.

-- 
Carlo Wood <carlo at alinoe dot com>

Attachment: dem3.diff
Description: Text document


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