C++ Logo

liaison

Advanced search

Re: [wg14/wg21 liaison] unreachable control flow

From: Aaron Ballman <aaron_at_[hidden]>
Date: Mon, 17 May 2021 07:01:33 -0400
On Sun, May 16, 2021 at 6:13 AM Jₑₙₛ Gustedt via Liaison
<liaison_at_[hidden]> wrote:
>
> Hello,
> it seems that C++ has integrated
>
> https://wg21.link/p0627
>
> into C++20. This provides a pseudo-function `unreachable` where a call
> indicates that the whole path in the control flow that reaches it can
> never be taken.
>
> Is there interest / attempt / opposition of porting this feature to C?

Personally, I'm in favor of the idea -- the proposed functionality
applies in C with the same general rationale (alongside similar C
functionality as _Noreturn and assert), and it would be handy to add
this functionality to C's toolbox.

~Aaron

>
> Thanks
> Jₑₙₛ
>
> --
> :: INRIA Nancy Grand Est ::: Camus ::::::: ICube/ICPS :::
> :: ::::::::::::::: office Strasbourg : +33 368854536 ::
> :: :::::::::::::::::::::: gsm France : +33 651400183 ::
> :: ::::::::::::::: gsm international : +49 15737185122 ::
> :: http://icube-icps.unistra.fr/index.php/Jens_Gustedt ::
> _______________________________________________
> Liaison mailing list
> Liaison_at_[hidden]
> Subscription: https://lists.isocpp.org/mailman/listinfo.cgi/liaison
> Link to this post: http://lists.isocpp.org/liaison/2021/05/0555.php

Received on 2021-05-17 06:01:49