This is the mail archive of the gcc-bugs@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: syntax error for egcs


> I have to put the extern in the template code because the type of
> the parameter is one of the template parameters.

You don't have to. If the function you want to call is declared
globally at the point of instantiation, it should work without the
extern declaration.

> Here is an example that illustrates the problem that I have, am I
> still doing something wrong?

No, your code is fine, and it compiles with both egcs 1.1.2, and gcc
2.95, on my system (i586-pc-linux-gnu). If it indeed breaks with egcs
1.1.1 as you, it seems like you have to upgrade (I can't verify that,
I don't have egcs 1.1.1 anymore).

Regards,
Martin


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