4 ms·
Pity the list isn't updated anymore, or uriel would've sure put these gems by Charles Forsyth in it: [B]y treating "compiling C" as a subset problem of "compil
by f2f 8y ago
Pity the list isn't updated anymore, or uriel would've sure put these gems by Charles Forsyth in it:
[B]y treating "compiling C" as a subset problem of "compiling C++", gcc and especially clang are vast whales whistling at the wrong frequency for the problem.
Plan 9 C implements C by attempting to follow the programmer’s instructions, which is surprisingly useful in systems programming. The big fat compilers work hard to find grounds to interpret those instructions as ‘undefined behaviour’.
- nerdponx 8y agoIt is interesting that compilers try to be so damn smart. Is -O0 still not faithful enough to the programmer's instructions?
- derefr 8y agoOften the generalized parsing/lexing/codegen/etc. algorithm that exists in service of -O1 through -O3 can be turned "down to a trivial level" with -O0, but not "off"—as that would require an entirely separate code-path.
- kps 8y agoDennis Ritchie, in his ‘noalias must go’ essay, described that proposal as “a license for the compiler to undertake aggressive optimizations that are completely legal by the committee's rules, but make hash of apparently safe programs.” (That he did not write something similar about ‘undefined behavior’ makes it clear that no one at the time intended or even guessed at the mess it would make of the language.)