C++ Logo

liaison

Advanced search

Re: [wg14/wg21 liaison] [isocpp-sg21] Telecon to review P2388R1 Minimum Contract Support: either Ignore or Check_and_abort

From: Jₑₙₛ Gustedt <jens.gustedt_at_[hidden]>
Date: Wed, 22 Sep 2021 20:30:34 +0200
Andrzej,

on Wed, 22 Sep 2021 20:06:52 +0200 you (Andrzej Krzemienski via Liaison
<liaison_at_[hidden]>) wrote:

> Personally, I think that `noreturn` in declaration:
>
> [[noreturn]] int f(int i);
>
> Also expresses the function's contract, and is important, because it
> affects what usages of the function are correct or not. Even if the
> compiler "ignores" it.

That is done with proper syntax using a keyword in C.

And, IIRC what I've read, that's one of the reasons introducing
attributes to C failed at the first attempt for C11. And also, this
seems to be why other languages integrate such a property in the type
system.

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 ::

Received on 2021-09-22 13:31:19