It seems I can call a function without prototype and definition of it in C, and the compilation (no link) worked well. Link would work if the function is defined in other module which is passed to the link command. But the call site would assume every parameter passed to it is int
type. Is there any documentation for this or any part of the C standard mentioned this behavior?
For example, below source file could be compiled without any problem in VC++ 2010.
// NoPrototype.c
// Compile it as cl.exe /c NoPrototype.c
int main()
{
FakeFunction(1, 2, 3); // No definition for this function in this compilation unit.
}