|
|
|
|
|
by sdkmvx
4454 days ago
|
|
Show me where in the ANSI standard it says this is illegal. Implementation details do not matter. The Microsoft C compiler will compile a ANSI C89-conforming program into a runnable executable on Windows. The rest is undefined. And while we're on implementation details, please note that most UNIX platforms do not start at main either. Most platforms include some soft of crt0 that must be linked which contains the real entry point. The dynamic linker will also run code prior to main. But the C standard only defines what the environment looks like when execution begins and makes no statement on what might run before or how the program got into memory in the first place. |
|