C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Every variable is volatile, everything is laundered, no optimisation

From: Thiago Macieira <thiago_at_[hidden]>
Date: Sun, 27 Aug 2023 18:03:24 -0700
On Sunday, 27 August 2023 16:25:25 PDT Frederick Virchanza Gotham via Std-
Proposals wrote:
> (1.3) — the optional verbose is present if the compiler is to disable
> all optimisations inside the body of the function, treating all
> objects as though they were volatile, not enforcing aliasing rules,
> and not eliding any comparisons or operations even if they appear to
> be redundant or to have undefined behaviour. For class objects of type
> 'volatile', the member function marked 'volatile' is the first choice
> to be invoked if it is accessible, otherwise any suitable member
> function not marked 'volatile' is invoked. A function marked 'verbose'
> cannot also be marked 'inline', and shall not be expanded inline by
> the compiler.

I'm pretty sure this paragraph is also too short by an order of magnitude:
there are far more behaviours that you want to change or suppress. The moment
you make it that big, then everyone else will want to have their say too,
which is going to make it at least twice as big as that again. And everyone
will not agree on the set of rules either.

Then you'll start to impose what should happen instead of what shouldn't
happen. At the end, you'll have specified all the behaviours and made a new
language.

Anyway, just try.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel DCAI Cloud Engineering

Received on 2023-08-28 01:03:26