C++ Logo

liaison

Advanced search

Re: [wg14/wg21 liaison] labels

From: Jens Gustedt <jens.gustedt_at_[hidden]>
Date: Tue, 11 Aug 2020 14:26:44 +0200
Martin,

on Tue, 11 Aug 2020 11:04:44 +0000 you ("Uecker, Martin via Liaison"
<liaison_at_[hidden]>) wrote:

> Am Dienstag, den 11.08.2020, 10:09 +0100 schrieb Niall Douglas via
> Liaison:

> > Is there any chance that you might propose C standardising computed
> > gotos? Then Python on MSVC goes +30% faster. You would, quite
> > literally, save millions of kWh of wasted electricity in the next
> > few decades.
>
> I will put it on my list... I think the type should
> not be void* for labels. Maybe:
>
> noreturn void (*addr)(void);

If we want this, I really would like that to be a type that is outside
of the current type system. A type with just these
operations

 - initialization

 - copy

 - `goto`


> (sadly noreturn is not part of the type though...)

exactly

the sematics of these label objects are different from object pointers
(there is no object) or function pointer (there are no parameters, it
does not return, and the call syntax doesn't apply)

how compilers implement that feature, I wouldn't care

Jens

-- 
:: 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 2020-08-11 07:30:13