| ▲ | flohofwoe an hour ago | |||||||
You can get that behaviour (mostly) already today by simply not enabling optimizations. The resulting performance difference is basically the price to pay for such a 'strict' compiler which translates the input source code straight into machine code instructions without attempting to simplify the output code via inlining, constant folding and dead code removal. | ||||||||
| ▲ | vbezhenar an hour ago | parent [-] | |||||||
-O0 program is useless and should be written with any other language. The whole point of C is to use compiler with optimizations. I'm not against optimizations. I'm against optimizations that perform things unexpected by the programmer. Dead code removal is unexpected by the programmer, because programmer does not write dead code. | ||||||||
| ||||||||