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: Alexei Podtelezhnikov
Subject: Re: [ft-devel] LLP64 model outside Win64
Date: Mon, 12 Feb 2018 10:08:53 -0500

On Mon, Feb 12, 2018 at 1:07 AM, Werner LEMBERG <address@hidden> wrote:
>
>>>>
>>>>   (void *)(((char *)0) + (x))
>>>>
>>>
>>> Wow! Very cool!
>>>
>>>
>>> I'm fairly sure that's undefined in C standard as well.
>
> My first impression also...

Can we properly use the FT_List data field as an actual pointer to the
glyph index instead of stuffing the integer into the pointer? That is
the root cause of this mess. It does look like integer to pointer
conversion is ill-defined and should be avoided. Here is another
warning quote from C99 (6.3.2.3):

An integer may be converted to any pointer type. Except as previously
specified, the
result is implementation-defined, might not be correctly aligned,
might not point to an
entity of the referenced type, and might be a trap representation.



reply via email to

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