Date: Tue, 18 May 2021 18:03:14 +0200
On Tue, May 18, 2021 at 6:00 PM Jāāā Gustedt <jens.gustedt_at_[hidden]> wrote:
>
> I think that the two are really not the same. Calling `abort()` has
> defined behavior, it forces the implementation to branch conditionally
> and to terminate the execution if the branch is taken. My idea of
> `unreachable` would be that the implementation may produce code they
> want, and in particular they may remove the test of the condintional
> and unreachable branch completely. It is the user's responsibility to
> make sure that this ok, it is the compiler's responsibility to make the
> best from that assumption.
Please note I said "assuming this is the aborting one" :-)
Cheers,
Miguel
>
> I think that the two are really not the same. Calling `abort()` has
> defined behavior, it forces the implementation to branch conditionally
> and to terminate the execution if the branch is taken. My idea of
> `unreachable` would be that the implementation may produce code they
> want, and in particular they may remove the test of the condintional
> and unreachable branch completely. It is the user's responsibility to
> make sure that this ok, it is the compiler's responsibility to make the
> best from that assumption.
Please note I said "assuming this is the aborting one" :-)
Cheers,
Miguel
Received on 2021-05-18 11:03:26