Quote:
Originally Posted by jbjb
Under the "as-if" rule, reordering shouldn't affect the computed results (so long as there's no undefined behaviour, such as signed overflow, going on). Some compilers have options to enable unsafe optimisations which might affect things if you're e.g. operating at the limits of floating point precision, so rounding errors mount up, and some may even default to those being turned on, but they must have a way of turning them off or they're not conforming.
|
Yes, they have options to turn them off.
I could maybe make peace with unsafe optimisations being on by default outside parentheses but I think parentheses should be honored by default unless unsafe optimisations are
explicitly enabled. I feel completely entitled to V&R about it. Being technically conforming does not mitigate that, it is part of the cause of the V&R.