3 ms·
Many errors have arisen from someone tacitly assuming what "any reasonable compiler" would do. These questions barely scratch the surface of the possibilities.
by mannykannot 3y ago
Many errors have arisen from someone tacitly assuming what "any reasonable compiler" would do. These questions barely scratch the surface of the possibilities.
Furthermore, just because your code works with Reasonable Compiler 1, it does not mean it will work with Reasonable Compiler 2. I think I have seen enough C compilers that, for each of these questions, you could pick a pair giving different answers.
- AnimalMuppet 3y agoWorse, Reasonable Compiler 1 may give different results, depending on what flags you pass it at compile time.
- krychu 3y agoYour code dictates the compiler's behavior. If you grant the compiler flexibility, it's unreasonable to complain about unexpected results.
- mannykannot 3y agoI don't think it is a complaint; it's an observation in support of a point of view.