3 ms·
60559 specifically allows value-changing optimizations, so long as optimizations are not disabled. I have seen more than one compiler that allows at least some
by aidenn0 12y ago
60559 specifically allows value-changing optimizations, so long as optimizations are not disabled. I have seen more than one compiler that allows at least some value-changing optimizations with their equivalent to gcc -O2.
Also, as far as I can tell, C99 (even with Annex F) does not follow parts of IEC 60559 with regards to:
> A language standard should also define, and require implementations to provide, attributes that allow and
disallow value-changing optimizations, separately or collectively, for a block.
[edit]
And note that one example "value-changing optimization" is applying associative and distributed rules. Fused multiply-add is another that is really common.