3 ms·
> We just need tools that make the bug visible, e.g. the undefined behavior sanitizers. Does the compiler faithfully compile the source code with sanitizers?
by gavinhoward 2y ago
> We just need tools that make the bug visible, e.g. the undefined behavior sanitizers.
Does the compiler faithfully compile the source code with sanitizers? Of course not, so we still cannot rely on them.
> So you can not distinguish between intended wraparound and incorrect wraparound.
This is exactly why I implemented both types in my arithmetic. The one I used is the one I intended.
- uecker 2y agoA compiler which compiles with a sanitizer can be perfectly conforming, i.e. faithfully compile a program.
- gavinhoward 2y agoThat is not what I mean. I mean that the compiler follows the programmer's intent.
- uecker 2y agoHow would a compiler know the programmer's intent?