|
|
|
|
|
by dxhdr
986 days ago
|
|
> But if your assertion checks don't run in release mode, and due to some bug, those invariants don't hold, well, your program is already going to exhibit undefined behaviour. Why not let the compiler know about the undefined behaviour so it can optimize better? Usually in release mode you want to log the core dump and then fix the bug. |
|
The unreachable pragma suggested by the author is just a more extreme version of the latter choice.