Comparing pointers in C and D
Dukc
ajieskola at gmail.com
Thu Feb 16 08:17:13 UTC 2023
On Wednesday, 15 February 2023 at 20:07:35 UTC, Olivier Pisano
wrote:
> Does the D spec define pointer comparison semantics ? What
> should the correct behaviour be? I can understand the C
> standard wording in regards to segmented memory archs, but I
> must admit I have trouble justifying it on a PC with linear
> address space...
I cannot find a relevant line in the spec. It should be defined
behaviour, as it is allowed in `@safe`, but the result of the
comparison is probably undefined, in the same way a `bool`
variable initialised with ` = void` is undefined.
More information about the Digitalmars-d
mailing list