3 ms·
2. You must not write software very amenable. Fun fact btw: GCC and LLVM are the only compilers I know of to assume loops can overflow at all when optimization
by DannyBee 13y ago
2. You must not write software very amenable.
Fun fact btw: GCC and LLVM are the only compilers I know of to assume loops can overflow at all when optimizations are on.
Compilers like XLC will actually even assume unsigned loop induction variables will not ovefrlow at O3, unless you give them special flags.
:)
- klodolph 13y ago> Compilers like XLC will actually even assume unsigned loop induction variables will not ovefrlow at O3 That's not exactly fair. The C standard guarantees that unsigned variables will overflow by wrapping, so if the compiler assumes such a loop won't terminate, it is not conformant.
- DannyBee 13y agoThat's exactly the point: they cheat, because it makes code faster except in the small percent of code it breaks. Let us all now bow our heads to the almighty SPEC gods ...