8 ms·
We're talking about the code from the actual source files, not the standard. Look here (lines 22 and 23): https://github.com/mortdeus/legacy-cc/blob/master/pre
by rmrfrmrf 13y ago
We're talking about the code from the actual source files, not the standard.
Look here (lines 22 and 23): https://github.com/mortdeus/legacy-cc/blob/master/prestruct/c00.c https://github.com/mortdeus/legacy-cc/blob/master/prestruct/...
The compiler code states int argv[], not char argv[] (I assumed this is why the OP asked for clarification in the first place, since char argv[] is much more common).
You're right, in theory this is undefined behavior, but in practice on a 32-bit system, sizeof(int) will almost always be equal to sizeof(void *). I was just demonstrating how one could recreate the code in the compiler while on a 64-bit architecture.