Remix.run Logo
▲ vbezhenar an hour ago

It's not about inserting checks. It's about removing code that I wrote from the binary. That should not happen silently.

▲flohofwoe 18 minutes ago | parent [-]

You can get that behaviour 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 8 minutes 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.