This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Template mangling bug in egcs-2.90.16
- To: tom at rp168 dot urz dot tu-dresden dot de (Tom Kunert), egcs at cygnus dot com
- Subject: Re: Template mangling bug in egcs-2.90.16
- From: Jason Merrill <jason at cygnus dot com>
- Date: 17 Nov 1997 10:45:46 -0800
- References: <vyz67pr25id.fsf@issan.informatik.uni-dortmund.de><Pine.LNX.3.96.971117163642.10130A-100000.cygnus.egcs@rp168.urz.tu-dresden.de>
>>>>> Tom Kunert <tom@rp168.urz.tu-dresden.de> writes:
> Obviously the compiler sees two different functions f1(1) : One is the
> instantiation of a template and one is an ordinary function. According
> to the DWP these functions can coexist, the overload-resolution rules
> prefer the normal function.
Yes.
> The friend declaration in the example is regarded as function, not as
> template, so it is undefined (U). Any call to f1(int) will result in a
> linker error: f1(int) not defined.
Yes.
> The question is, whether the compiler is allowed to regard the friend
> declaration as an ordinary function. I think, this should be a function
> template and there is a bug in egcs. (See DWP Nov. 96, 14.3.5)
No. Guiding decls have been removed from the language. BTW, there is no
14.3.5 in the Nov. 96 WP; what section are you referring to?
Jason