Yes this is what i meant. I'd expect that the sizeof(pointer) to return the
target architecture's pointer size, not the architecture of the compiler's
own executable.

On Wed, Nov 19, 2014 at 5:22 PM, Sven Barth <[email protected]>
wrote:

> Am 19.11.2014 16:15 schrieb "Kostas Michalopoulos" <
> [email protected]>:
> >
> >
> > On Mon, Nov 10, 2014 at 4:07 PM, Michael Van Canneyt <
> [email protected]> 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
>
> _______________________________________________
> fpc-devel maillist  -  [email protected]
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
>
>
_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to