[fpc-devel] Address size compiler
Sven Barth
pascaldragon at googlemail.com
Wed Nov 19 17:22:29 CET 2014
Am 19.11.2014 16:15 schrieb "Kostas Michalopoulos" <badsectoracula at gmail.com
>:
>
>
> 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}
Michael's message wasn't meant as literal code. A compiler compiled for
x86_64 will have sizeof(pointer)=8, but the pointer size of the target
architecture (AFAIK called "aint" in the compiler, but I'm not sure
currently) might be different from that, so inside the compiler One should
know exactly which kind of Pointer one is talking about.
Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20141119/86b219a2/attachment.html>
More information about the fpc-devel
mailing list