Consider this C program:
int main()
{
puts("Hello world!");
return 0;
}
This compiles and runs fine and as far as I understand, is legal C89. However, I'm not 100% sure about that. Compiling in C99 mode with clang informs me that implicit declaration of function 'puts' is invalid in C99
(which makes me think that the C standard must have changed in C99 to make implicit function declaration illegal, which is what I'm trying to confirm).
Is implicit function declaration legal in C89? (even if it's a bad idea to do it (unless your in an obfuscated C code challenge))
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…