I get the following compiler¹ message
main.cpp: In instantiation of ‘void fkt(Foo) [with Foo = int]’:
main.cpp:5:7: required from here
The binary is created anyway, so it's not an error. But it's also not marked as a warning. What is this message and why do I get it?
I reduced the code to the following example
template <typename Foo>
void fkt(Foo f) {}
int main() {
fkt(1);
return 0;
}
¹ gcc 4.7.2
EDIT: Here the steps to reproduce:
% cat main.cpp
template <typename Foo>
void fkt(Foo f) {}
int main() {
fkt(1);
return 0;
}
% g++ -Wall -Wextra main.cpp
main.cpp: In instantiation of ‘void fkt(Foo) [with Foo = int]’:
main.cpp:5:7: required from here
main.cpp:2:6: warning: unused parameter ‘f’ [-Wunused-parameter]