https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122196

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
extern "C" {
template<typename T> void bar(T) {}
void foo () {
  bar(1);
  bar('X');
}
}
is rejected nicely though, with error: template with C linkage
And so is
template<typename T> void main(T) {}
void foo () {
  main(1);
  main('X');
}
error: cannot declare ‘::main’ to be a template

Reply via email to