Comment by temac
3 years ago
The standard doesn't do that often, but it does sometimes. E.g. realloc to null which was previously defined, and is now UB :(
3 years ago
The standard doesn't do that often, but it does sometimes. E.g. realloc to null which was previously defined, and is now UB :(
We are taking about code written before the standard so every bit of UB in the standard is in play here.
Eg the fact that overflowing a signed int can cause the compiler to go amuck would certainly be a surprise to the person who wrote code for the PDP-11.