From what I can gather from The C Book 4.2 your function definition is not a prototype since it specifies no type information for the arguments. This means the compiler only remembers the return type and retains no information on the arguments whatsoever.
This form of definition is still allowed for backward compatibilty and is not restricted to functions that take no arguments. gcc will equally allow something like
void hello( a ) {
}
int main( int argc, char* argv[] ) {
int test = 1234;
hello(test,1);
return 0;
}
It is only the lack of type information for the arguments that is important here. To fix this and ensure that gcc checks the arguments when the function is used you can put the type information in either a declaration of your function or the definition. Preferably you would put them in both.
All of this still doesn't really answer your question of course as to why gcc doesn't warn you. It must be the case that the gcc team feel there is still enough old-style C code out there to justify suppressing the warning by default. IMO I'm surprised that the -Wstrict-prototype
option as mentioned by @caf is not on by default.