C++ patch for 417:"curried template inaccurate names"

Larry Evans jcampbell3@prodigy.net
Thu Nov 9 05:25:00 GMT 2000


Attached is a patch to the g++ 2.96 compiler that exterminates
bug 417: "curried template inaccurate names".
----------<reason for changes>---------------
The reason the previous method.c failed was because
method.c(build_template_parm_names) did not take into account nested
template template parameters.  This is corrected by calling the new
function, build_qualified_nested_name, just before the unqualified
template name is output.

This change also required a corresponding change in cplus-dem.c.  The
change here involved moving the code which appended the template name to

the <arguments> to the end of demangle_template_template_parm and, in
addition, testing to see whether 'Q' started the template name, and if
so, call demangle_qualified instead of just exiting without appending
anything.
----------<change logs>---------------
The change log entries are also attached.
Attachment
    ChangeLog.curryTemplate.libiberty
is for the <srcdir>/libiberty directory.
Attachment
    ChangeLog.curryTemplate.cp
is for the <srcdir>/gcc/cp directory.
----------<test case>---------------
The test case is in attachment mangle2.C
----------<test results>---------------
`make check-g++` was run in <objdir>/gcc with the following result
(which was no different than without the patch):


WARNING: Couldn't find the global config file.
Test Run By evansl on Thu Nov  9 05:33:05 2000
Native configuration is i586-pc-linux-gnu

  === g++ tests ===

Schedule of variations:
    unix

Running target unix
Using /usr/local/share/dejagnu/baseboards/unix.exp as board description
file for target.
Using /usr/local/share/dejagnu/config/unix.exp as generic interface file
for target.
Using
/mnt/scratch/gcc-2.96/latest-cvs/gcc/gcc/testsuite/config/default.exp as
tool-and-target-specific interface file.
Running
/mnt/scratch/gcc-2.96/latest-cvs/gcc/gcc/testsuite/g++.dg/special/ecos.exp
...
FAIL: g++.dg/special/conpr-1.C execution test
FAIL: g++.dg/special/conpr-2.C execution test
FAIL: g++.dg/special/conpr-3.C execution test
FAIL: g++.dg/special/conpr-3.C execution test
Running
/mnt/scratch/gcc-2.96/latest-cvs/gcc/gcc/testsuite/g++.old-deja/old-deja.exp
...
FAIL: g++.ext/initp1.C  Execution test
FAIL: g++.ext/instantiate1.C not instantiated (test for errors, line 18)

FAIL: g++.ext/instantiate1.C not instantiated (test for errors, line 20)

FAIL: g++.other/crash18.C (test for excess errors)
FAIL: g++.other/loop2.C caused compiler crash

  === g++ Summary ===

# of expected passes  6072
# of unexpected failures 9
# of expected failures  105
# of untested testcases  9
/mnt/scratch/gcc-2.96/latest-cvs/obj/gcc/testsuite/../g++ version 2.97
20001108 (experimental)

----------<feedback>---------------
Please let me know what else needs to be done.
----------<end>---------------



More information about the Gcc-patches mailing list