public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Template mangling bug in egcs-2.90.16
@ 1997-11-17  2:12 Andreas Schwab
  1997-11-17  8:12 ` Tom Kunert
       [not found] ` <Pine.LNX.3.96.971117163642.10130A-100000.cygnus.egcs@rp168.urz.tu-dresden.de>
  0 siblings, 2 replies; 7+ messages in thread
From: Andreas Schwab @ 1997-11-17  2:12 UTC (permalink / raw)
  To: egcs

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~1997-11-17 23:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-11-17  2:12 Template mangling bug in egcs-2.90.16 Andreas Schwab
1997-11-17  8:12 ` Tom Kunert
1997-11-17 12:30   ` Alexandre Oliva
     [not found]   ` <or67prihnu.fsf.cygnus.egcs@grupiara.dcc.unicamp.br>
1997-11-17 18:11     ` Jason Merrill
     [not found] ` <Pine.LNX.3.96.971117163642.10130A-100000.cygnus.egcs@rp168.urz.tu-dresden.de>
1997-11-17 13:18   ` Jason Merrill
1997-11-17 23:08     ` Tom Kunert
1997-11-17 23:16       ` Jason Merrill

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).