The documentations says (emphasis on the last sentence):
---
It is inevitable that the D language will evolve over time. Therefore, the version identifier namespace beginning with "D_" is reserved for identifiers indicating D language specification or new feature conformance. Further, all identifiers derived from the ones listed above by appending any character(s) are reserved.
This means that e.g. ARM_foo and Windows_bar are reserved while foo_ARM and bar_Windows are not.
---
However, this code compiles, which seems contrary to the spec.
---
version = ARM_foo;
version = Windows_bar;
version (ARM_foo)
{
void foo()
{
}
}
version (Windows_bar)
{
void bar()
{
}
}
---
Comment #1 by ibuclaw — 2017-06-24T12:15:07Z
On an implementation note, VersionCondition.isReserved() could probably be cleaned up a little more by implementing this. Assuming that it ends up being similar to how the "D_*" versions are checked, but a bit more generic, the following could be removed from the list: ARM_*, PPC_*, MIPS_*, SPARC_*, Alpha_*.
Comment #2 by pro.mathias.lang — 2022-07-06T16:30:10Z
Honestly this sounds very impractical, and I'm not sure it should be fixed.
Comment #3 by dlang-bot — 2022-07-06T17:04:14Z
@ibuclaw created dlang/dmd pull request #14271 "[experiment] fix Issue 17544 - Versions derived from predefined versions not reserved" fixing this issue:
- fix Issue 17544 - Versions derived from predefined versions not reserved
https://github.com/dlang/dmd/pull/14271
Comment #4 by robert.schadek — 2024-12-13T18:52:44Z