When casting Pointer to PtrUInt, compiler incorrectly hints "Conversion between ordinals and pointers is not portable"
Original Reporter info from Mantis: Hixie
-
Reporter name: Ian Hickson
Original Reporter info from Mantis: Hixie
- Reporter name: Ian Hickson
Description:
The following code which casts Pointer to PtrUInt gives the hint "Conversion between ordinals and pointers is not portable", which is not especially helpful since the whole point of PtrUInt is to have a portable way of casting pointers to ordinal types.
{$HINTS ON}
program tests;
var
P: Pointer;
I: PtrUInt;
begin
P := nil;
I := PtrUInt(P);
Writeln('Pass? ', I = 0);
end.
Mantis conversion info:
- Mantis ID: 19582
- Build: trunk compiled 2011-06-17
- Version: 2.5.1