This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Template mangling bug in egcs-2.90.16
- To: egcs at cygnus dot com
- Subject: Template mangling bug in egcs-2.90.16
- From: Andreas Schwab <schwab at issan dot informatik dot uni-dortmund dot de>
- Date: 17 Nov 1997 11:12:42 +0100
In the following example the function f1 is referenced under the name
"f1(int)", but it should be "A<int> f1<int>(int)".
$ cat template.cc
template <class X>
struct A
{
X x;
friend A f1 (X);
};
template <class X> A<X> f1 (X) { A<X> a; return a; }
template <class X> A<X> f2 (const A<X>& a) { return f1 (a.x); }
template A<int> f1 (int);
template A<int> f2 (const A<int>&);
$ gcc -c template.cc
$ nm -C template.o
00000000 ? __FRAME_BEGIN__
U f1(int)
00000000 T A<int> f1<int>(int)
00000012 T A<int> f2<int>(A<int> const &)
00000000 t gcc2_compiled.
--
Andreas Schwab "And now for something
schwab@issan.informatik.uni-dortmund.de completely different"
schwab@gnu.org