C++ Logo

std-proposals

Advanced search

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

From: Gašper Ažman <gasper.azman_at_[hidden]>
Date: Mon, 28 Aug 2023 00:45:26 +0200
Jason is completely correct, but I want to state it more succinctly.

You are asking for help from the wrong people.

The standard does *not* specify translation to assembly. The standard
specifies the behaviour of the C++ abstract machine, which, if you get
down to it, is a segmented addressing model architecture with very
loose concurrency forward progress model and allowances for lowering
to a linear addressing model, but even worse, *actaually*, it's a
parametrized abstract machine where implementations have to fill in
all the blanks where it says "implementation-defined".

The standard therefore literally doesn't deal with translation to any
given assembly, and you'd have to write thousands of pages of text to
specify what you want for x86, and then it wouldn't get passed.
Remember, the standard doesn't even say that vtables exist!

It's *the implementations* that define lowering into assembly, given
what the standard says the syntax means. GCC can ignore what the
standard says if its users don't mind. The standard doesn't even have
words to do so.

Talk to the GCC people and there you might find a helpful ear. Some
committee people might even just change hats and be gcc people for
you. I do have to repeat that on *this* reflector, you're just wasting
your time. What you want is not expressible *in the standard* without
decades of work nobody wants to do and nobody wants to implement
afterwards.

Abandon hope, ye who enter here.

Received on 2023-08-27 22:45:39