I have some C programs without any explicit return from main, like this:
int main(int argc, char *argv[])
{
// blah blah
}
If I compile the
By default gcc is -std=gnu89 which is C90 + GNU extensions.
And C90 says:
(C90, 5.1.2.2.3) "If the main function executes a return that specifies no value, the termination status returned to the host environment is undefined"
Compiles with -std=c99 or -std=gnu99 to have a return value of 0 when return is omitted in main function.