|
|
|
|
|
by mr_00ff00
1126 days ago
|
|
Wow signed overflow is UB? I would have assumed it was defined, it just allows overflow. And I am assuming something like the NullPointerException comes with a huge performance hit? Otherwise I assume every systems language would do something similar. |
|
Since we can be sure if it ever happens your code has a bug, making it undefined is a good thing: the compiler can then assume it doesn't happen and so back track to prove some other things can't happen and so make your program run a little faster.