freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft-devel] LLP64 model outside Win64


From: Roland Mainz
Subject: Re: [ft-devel] LLP64 model outside Win64
Date: Sun, 11 Feb 2018 19:15:22 +0100

On Sun, Feb 11, 2018 at 6:02 AM, Alexei Podtelezhnikov
<address@hidden> wrote:
>  (void*)(size_t)(x) should be safe, c90, and warning-less.

You assume that all machines have a flat, linear memory model.... ;-(

The "safe", portable way is to use (void *)(((char *)0) + (x)) to cast
an integer to a void pointer, and use (ptrdiff_t)((char *)(x)) -
((char *)0) to cast a pointer to an integer. >

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) address@hidden
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 3992797
 (;O/ \/ \O;)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]