On Sunday, 16 February 2020 at 15:15:44 UTC, Stefan Koch wrote:
The register keyword as been deprecated for ages in C.
Since the compiler cannot actually guarantee that the variable will be a register.
As a result D does not have the register keyword.

That only applies for C++, where it doesn't (or rather didn't) even do the same thing as in C. In C it's an optimization aid with actual semantic implications. A register storage-class variable cannot be aliased, in fact, any attempt should cause compilation failure.

Whether it actually helps modern compilers with optimization is of course another matter ;)
  • "register int n&q... Виталий Фадеев via Digitalmars-d-learn
    • Re: "registe... Stefan Koch via Digitalmars-d-learn
      • Re: "reg... lithium iodate via Digitalmars-d-learn

Reply via email to