Conversation

Hardware doesn't implement C, so there isn't a standard behavior defined by hardware. It's up to the compiler to map C onto the hardware or the virtual machine. They get to choose how to handle each kind of undefined or implementation defined behavior, and everything else.
2
1
No, that's not what I've been saying. I think it would be a serious regression to break compatibility with safe implementations by making it correct to be incompatible with them. You want to massively roll back safety and security, especially if you want to remove it by default.
2
1
Yeah, it's a lot easier to introduce signed overflow checking, since portable C is already compatible with it and there are also simply a lot more use cases for intended signed overflow. Much harder to mark every intended unsigned overflow and fix all benign unintended cases.
1
1
Also can't simply easily upstream all of these changes for unsigned overflow, without convincing upstream projects that marking all intended overflows / fixing all benign overflows is worthwhile in order to use -fsanitize=unsigned-integer-overflow to find the unintended bugs.
1
1
And by benign cases, I mean that it's extremely common to have issues like overflowing by one after it no longer matters because the value isn't being read anymore. AOSP adopted automatic integer overflow for hardening and it wasn't easy to get it working. Lots of changes needed.
1
1