[fpc-devel] integer, cardinal

Peter Vreman peter at freepascal.org
Mon Apr 18 11:00:51 CEST 2005

> Oh, but while we're at it: fpc1.9.6 still gives me the Hint, that this
> PtrUInt/Address-Conversion isn't portable:
> |         WriteLn ('Runtime error ', ExitCode,
> |                  ' at 16#',
> |                  SysUtils.IntToHex (PtrUint(ErrorAddr),
> |                                     2 * SizeOf (ErrorAddr)),
> |                  '#');
> Is that fixed in the current version? Or am I thinking wrong when I
> think, this should - by definition - be portable? ;-)

It is only a hint. And Typecasting pointer <-> integer will always trigger
such a hint. It is usefull for ppl compiling on 32bit that they need to
look at thing carefully if it is what they intended. Typecasting a pointer
to longint on a 64bit target will give a warning instead.

But this hint/warning is independent of the first question about
integer/cardinal sizes. Please stay to the topic of the thread.

More information about the fpc-devel mailing list