[fpc-devel] Address size compiler

Kostas Michalopoulos badsectoracula at gmail.com
Wed Nov 19 16:15:38 CET 2014


On Mon, Nov 10, 2014 at 4:07 PM, Michael Van Canneyt <michael at freepascal.org
> wrote:

>
> For a cross-compiler,  sizeof(pointer) <> sizeof(pointer on target arch)
>

So wait, the following code:

{$if sizeof(pointer)=8} Code1 {$elseif sizeof(pointer)=4} Code2 {$endif}

will evaluate Code1 for a FPC compiler that is itself compiled as a x86_64
(64bit) linux program but itself targets Win32 (32bit)? If so, this is
highly counterintuitive (and i don't see the usefulness of it).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20141119/b92ff060/attachment.html>


More information about the fpc-devel mailing list