This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Template mangling bug in egcs-2.90.16


>>>>> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]