C++ Logo


Advanced search

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

From: JF Bastien <cxx_at_[hidden]>
Date: Sat, 22 May 2021 07:50:40 -0700
On Sat, May 22, 2021 at 7:49 AM Philipp Klaus Krause via Liaison <
liaison_at_[hidden]> wrote:

> Am 22.05.21 um 16:08 schrieb Robert Seacord via Liaison:
> > I'm looking for reviews / comments for n2743 Volatile C++ Compatibility
> > before submission. If you are interested in reviewing, you can find a
> > PDF of the proposal here:
> >
> > http://robertseacord.com/wp/2021/05/22/volatile-c-compatibility/
> > <http://robertseacord.com/wp/2021/05/22/volatile-c-compatibility/>
> >
> > Thanks,
> > rCs
> People use compound operators, increment and decrement on memory-mapped
> I/O registers.
> The justification of basically 'compound operators are misleading, since
> they look as if there was only one memory access instead of a read
> followed by a write' seems very weak to me. Users of volatile tend to be
> working close to the hardware, knowing how the hardware works.
> The remaining rationale apparently is just 'C++ removed the feature, so
> we should, too', which also seems a rather weak one to me.

The experience on this with real world code supports the deprecation: it
finds actual bugs in production code.

Received on 2021-05-22 09:50:53