Open intosi opened 8 years ago
Did you see https://github.com/mathiasbynens/small/issues/39? CC @matheus28
Fair enough, but then the following C file is equally valid, as you may apparently ignore warnings, and int is implicit if no type is specified:
main;
Exporting an int as 'main' is not a legal C program. This will crash with a bus error on OS X, SEGV on Debian 8 and FreeBSD 10.
yeah but it works
Fair enough, but then the following C file is equally valid, as you may apparently ignore warnings, and int is implicit if no type is specified:
main;
The so-called implicit int rule doesn't exist anywhere in the current C standards, and came from a time before C was standardized, so just using main;
would be invalid. However, I agree that the current int main;
is also problematic, so you might be interested in #87.
Exporting an int as 'main' is not a legal C program. This will crash with a bus error on OS X, SEGV on Debian 8 and FreeBSD 10.