I was not particularly interested in the term values as per “C++ standard per definition” of the abstract machine, but either or not you could physically get a computer to do it.
Can you use something like _BitInt(512) to write algorithm, have a compiler not respect alignment requirements expected to load a zmm register, and have a guarantee that the compiler would spit out machine code that that would be able to
run and perform as expected?
The answer is no, unless you’re a willing to also issue realignment instruction as required every time you need to load or store.
Talking about the abstract machine is a red herring, abstract machines don’t run code, physical computers do. Ands it’s irrelevant that you can represent something in a programming language if the machine is physically unable to do something
(i.e. unimplementable).
I can define that a uint64_t has an alignment of 3, and be purely consistent as far as the language goes. You just wouldn’t be able to compile that (or if you do it wouldn’t run on your machine without realignment).
Am I incorrect on this?
From: Tom Honermann <tom@honermann.net>
Sent: Thursday, September 11, 2025 16:18
To: std-proposals@lists.isocpp.org; David Brown <david.brown@hesbynett.no>
Cc: Tiago Freire <tmiguelf@hotmail.com>
Subject: Re: [std-proposals] D3666R0 Bit-precise integers
It has taken me a while to catch up on all of the recent emails.
Tiago, this is at least the third time that I've seen you passionately arguing for a perspective that is objectively incorrect from the perspective of the C++ standard. David provided clear and unambiguous references to the C and C++ standards to justify
his (correct) view and interpretation of values and objects. You have a fine understanding of how some machines work. It is clear to me that you lack some understanding of how the C and C++ languages define an abstract language that can be mapped to a wide
variety of hardware (including the various mental model compilers that reside in each of our minds). I suggest a little humility and advise you to take some time to study the C and C++ standards more thoroughly, particularly with regard to terminology.
Values do not have alignment. They do not even have representation (in the C and C++ standards). They are platonic abstractions. Rvalues correspond to a value.
Values may be held in objects. Objects have value representation and alignment defined by their type. Objects reside in addressable storage. Lvalues refer to an object.
A psABI defines alignment for types appropriate for the applicable machine(s). Those specifications assign alignment and representation appropriate for the manipulation of objects and operations on values.
Tom.
On 9/5/25 5:34 AM, Tiago Freire via Std-Proposals wrote:
And yet you don't understand that in some CPUs store/loads cannot strut across cache lines.
This is something that a CPU may not have the circuitry to physically do.