C++ Logo


Advanced search

Re: [wg14/wg21 liaison] unreachable control flow

From: Miguel Ojeda <miguel.ojeda.sandonis_at_[hidden]>
Date: Sun, 16 May 2021 16:03:05 +0200
On Sun, May 16, 2021 at 12:13 PM Jā‚‘ā‚™ā‚› Gustedt via Liaison
<liaison_at_[hidden]> wrote:
> Is there interest / attempt / opposition of porting this feature to C?

Sounds good to me.

Rust and Zig also provide it equivalent facilities, although Rust
provides both a safe version (panic) and an unsafe one (UB), which
could be worth having; and Zig provides a single one that is a panic
or UB depending on compilation mode.

So a couple questions for (both) papers would be:

  - Should we have a non-UB variant that e.g. `abort()`s, like Rust?

  - Should behavior depend on `NDEBUG`/`_DEBUG`/build "mode" or
similar, like Zig?


Received on 2021-05-16 09:03:19