freetype/src/pshinter
Werner Lemberg ce33a312da FT_USE_MODULE declares things as:
extern const FT_Module_Class

(or similar for C++).  However, the actual types of the variables
being declared are often different, e.g., FT_Driver_ClassRec or
FT_Renderer_Class.  (Some are, indeed, FT_Module_Class.)

This works with most C compilers (since those structs begin with an
FT_Module_Class struct), but technically it's undefined behavior.

To quote the ISO/IEC 9899:TC2 final committee draft, section 6.2.7
paragraph 2:

  All declarations that refer to the same object or function shall
  have compatible type; otherwise, the behavior is undefined.

(And they are not compatible types.)

Most C compilers don't reject (or even detect!) code which has this
issue, but the GCC LTO development branch compiler does.  (It
outputs the types of the objects while generating .o files, along
with a bunch of other information, then compares them when doing the
final link-time code generation pass.)

Patch from Savannah bug #25133.

* src/base/ftinit.c (FT_USE_MODULE): Include variable type.

* builds/amiga/include/freetype/config/ftmodule.h,
include/freetype/config/ftmodule.h, */module.mk: Updated to declare
pass correct types to FT_USE_MODULE.
2008-12-21 10:29:30 +00:00
..
Jamfile Add license. 2005-06-04 23:04:30 +00:00
module.mk FT_USE_MODULE declares things as: 2008-12-21 10:29:30 +00:00
pshalgo.c * src/pshinter/pshalgo.c (ps_hints_apply): Reset scale values after 2008-05-18 21:49:02 +00:00
pshalgo.h Cosmetic code changes. 2008-05-28 22:17:28 +00:00
pshglob.c formatting, copyright years 2006-02-27 18:25:22 +00:00
pshglob.h Avoid overwriting of numeric font dictionary entries for synthetic 2003-05-30 09:12:50 +00:00
pshinter.c * src/pshinter/pshalgo1.[ch], src/pshinter/pshalgo2.[ch]: Removed. 2003-05-28 22:42:41 +00:00
pshmod.c * src/cache/ftccache.c (ftc_node_mru_link, ftc_node_mru_unlink), 2007-05-16 15:19:42 +00:00
pshmod.h Formatting. 2001-12-05 01:22:05 +00:00
pshnterr.h * src/tools/glnames.py: Updated to AGL 2.0. 2003-06-23 19:26:53 +00:00
pshrec.c * src/pshinter/pshrec.c (ps_mask_table_set_bits): Add `const'. 2007-05-20 18:07:52 +00:00
pshrec.h Cosmetic code changes. 2008-05-28 22:17:28 +00:00
rules.mk * src/winfonts/winfnt.c (FNT_Load_Glyph): Use first_char in 2003-06-22 15:33:53 +00:00