Making Errors errors
Paul Backus
snarwin at gmail.com
Fri Jan 29 14:23:11 UTC 2021
On Friday, 29 January 2021 at 14:19:02 UTC, sighoya wrote:
> On Friday, 29 January 2021 at 00:39:08 UTC, Paul Backus wrote:
>> If out-of-bounds array access is defined by the language spec
>> as an unrecoverable error, an optimizing compiler is allowed
>> to assume that no program ever recovers from it, and
>> potentially re-order code based on that assumption. So you
>> cannot actually be sure that "the code following after the
>> random access wouldn't be executed."
>
>
> Okay, if out-of-bound exceptions cause UB, then we can neither
> abort the program entirely because UB now belongs to our
> semantic or the compiler have to completely reject any way of
> UB at compile time.
"Unrecoverable error" does not mean the same thing as UB.
More information about the Digitalmars-d
mailing list