C++ Logo

liaison

Advanced search

Re: [wg14/wg21 liaison] n2743 Volatile C++ Compatibility

From: Jₑₙₛ Gustedt <jens.gustedt_at_[hidden]>
Date: Sun, 23 May 2021 09:23:29 +0200
on Sat, 22 May 2021 16:54:34 +0000 you ("Uecker, Martin via Liaison"
<liaison_at_[hidden]>) wrote:

> Deprecating volatile on return types seems like a good idea,

Yes, even more, all qualifiers. In C, the qualification is not part of
the effective return type anyhow, see 6.7.6.3 p4 last sentence. IIRC we
introduced that in C17 to avoid glitches with `_Generic` and
observability of types in general.

> but on parameters it has a valid uses. I find the suggestion
> that one can copy those into a new variable not very convincing.
> It would be another special exception. We should make the
> language simpler and not more complicated.
>
> There is also no reason to include qualifiers in prototypes,
> so these do not have to leak implementation details. One
> could consider deprecating all qualifiers on parameters in
> function declarations that are not part of a function
> definitions. This would make more sense to me.

So we could do that even larger for parameters and the return type.

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-05-23 02:23:36