C89 vs c99 GCC compiler
问题 Is there a difference if I compile the following program using c89 vs c99? I get the same output. Is there really a difference between the two? #include <stdio.h> int main () { // Print string to screen. printf ("Hello World\n"); } gcc -o helloworld -std=c99 helloworld.c vs gcc -o helloworld -std=c89 helloworld.c 回答1: // comments are not a part of C89 but are OK in C99, falling off of main() without returning any value is equivalent to return 0; in C99, but not so in C89. From N1256 (pdf), 5