Template mangling bug in egcs-2.90.16
Jason Merrill
jason@cygnus.com
Mon Nov 17 13:18:00 GMT 1997
>>>>> 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
More information about the Gcc
mailing list