[Dlang-internal] Does D spec require arbitrary memory access?
Paulo Torrens via Dlang-internal
dlang-internal at puremagic.com
Fri Mar 17 09:38:45 PDT 2017
According to the C language spec, casting from integer to
pointers is implementation defined. Though one would expect it to
work, the spec does not require compilers to allow it.
For example, for accessing VGA text video memory, one would write
(in D):
byte *video = cast(byte *)0xB8000;
As a systems' programming language, existing D compilers surely
do allow that. But does the spec actually require it, or simply
allow it?
More information about the Dlang-internal
mailing list