C++ Logo

liaison

Advanced search

Re: [wg14/wg21 liaison] How to handle conflicting 'unreachable' definitions

From: Jₑₙₛ Gustedt <jens.gustedt_at_[hidden]>
Date: Thu, 4 Apr 2024 16:39:59 +0200
Jonathan,

on Thu, 4 Apr 2024 15:24:21 +0100 you (Jonathan Wakely
<cxx_at_[hidden]>) wrote:

> On Thu, 4 Apr 2024 at 15:16, Jₑₙₛ Gustedt via Liaison <
> liaison_at_[hidden]> wrote:
>
> > Aaron,
> > clang could also promote the existing `__builtin_unreachable` to the
> > `std` namespace or have an alias of that name, there. Though I don't
> > know if such a thing is politically admissible ;-)
> >
>
> C++ already has std::unreachable(),

Sure, that's what we are discussing here, aren't we ;-)

> so no need for the built-in name.

The need arises with the question Aaron poses, namely to ensure that a
macro expansion of the C23 macro (which uses `__builtin_unreachable`)
would resolve to something reasonable with which clang in C++ mode
could work with.

Thanks
Jₑₙₛ

-- 
:: ICube :::::::::::::::::::::::::::::: deputy director ::
:: Université de Strasbourg :::::::::::::::::::::: ICPS ::
:: INRIA Nancy Grand Est :::::::::::::::::::::::: Camus ::
:: :::::::::::::::::::::::::::::::::::: ☎ +33 368854536 ::
:: https://icube-icps.unistra.fr/index.php/Jens_Gustedt ::

Received on 2024-04-04 14:40:03