3 ms·
FWIW I compiled this with gcc 4.9.3 -O3 and got: satd.c:7:29: warning: iteration 15u invokes undefined behavior [-Waggressive-loop-optimizations]
by ursus_bonum 11y ago
FWIW I compiled this with gcc 4.9.3 -O3 and got:
satd.c:7:29: warning: iteration 15u invokes undefined behavior [-Waggressive-loop-optimizations]
for (dd=d[k=0]; k<16; dd=d[++k]) {
^
- Mindless2112 11y agoGood evidence that compiler writers aren't quite so malicious as the author portrays. Warnings, not optimizations, are what most programmers actually want from undefined behavior.