[fpc-devel] Address size compiler
Michael Van Canneyt
michael at freepascal.org
Mon Nov 10 16:07:23 CET 2014
On Mon, 10 Nov 2014, Jonas Maebe wrote:
>
> Steve Hildebrandt wrote on ma, 10 nov 2014:
>
>> How oder where is the addres size for the current compiler target defined?
>
> See the last three entries in table G.2. at
> http://www.freepascal.org/docs-html/prog/progap7.html
>
> Alternatively, you can use
> {$if sizeof(pointer)=8}
> <64 bit pointers>
> {$elseif sizeof(pointer)=4}
> <32 bit pointer>
> etc...
I think he means in the compiler, but for the target the compiler is not compiling for.
For a cross-compiler, sizeof(pointer) <> sizeof(pointer on target arch)
Michael.
More information about the fpc-devel
mailing list