On Mon, Feb 12, 2018 at 1:07 AM, Werner LEMBERG <w...@gnu.org> 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.

_______________________________________________
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel

Reply via email to