Im quite confused about what you're actually asking. I was going to explain about what konsolebox said, but I dont know if thats what you're asking. If it isnt, you can turn up your warning levels and you will notice that your first example has a similar warning message as the second one.
Code:
jordan@jordan-laptop:~$ gcc test.c
test.c: In function ‘main’:
test.c:3: warning: incompatible implicit declaration of built-in function ‘printf’
Code:
jordan@jordan-laptop:~$ gcc -Wall test.c
test.c: In function ‘main’:
test.c:3: warning: implicit declaration of function ‘printf’
test.c:3: warning: incompatible implicit declaration of built-in function ‘printf’
Because of this, I think you only see that warning message unique to your first example because its specific to standard C functions. I have read that 'implicit functions' are basically prototyped as
So that it's return type is int, but
nothing is said about its arguments. Note that "foo()" does
not mean the function does not accept any arguments--"foo(void)" is used for that case. So I would try some other "simpler" standard functions, i.e. one that matches the implicit function prototype of "int foo()". Maybe in this case you will only get the 1 warning message that you get with your "lnux" function", and not the "incompatible" one.