Date: Mon, 21 Sep 2026 21:33:18 +0200
The abstract machine does not have registers, especially not in a portable way.
If you want named hardware registers, use an asm block.
That would be an absolute mess to specify. You would have to specify all kind of theoretical side effects to avoid the as-if rule. Even for registers not used with normal C++ and implemented on a single hardware architecture.
Perhaps an implementation could do it as non-standard extension. Like periphery registers on microcontrollers.
But it does not belong into the standard.
It is not compatible from a philosophical, technical, wording, practical level.
-----Ursprüngliche Nachricht-----
Von:Liam Graham via Std-Proposals <std-proposals_at_[hidden]>
Gesendet:Mo 21.09.2026 14:09
Betreff:[std-proposals] PROPOSAL: Reintroduce register — wise for developer-first decisions.
An:std-proposals_at_[hidden];
CC:Liam Graham <liamgraham_at_[hidden]>;
Treat it like a storage class, not as a compiler hint
Register int X["R8"]
Or perhaps
Register int X[0] where [N] is the register file index. The issue is calling conventions. But allow the developer to shoot themselves in the foot if they choose.
#pragma register(RAX)
[[register:RAX]]
Etc etc
--
Std-Proposals mailing list
Std-Proposals_at_[hidden]
https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
Received on 2026-09-21 19:40:22
