freetype2/src/cid
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
ciderrs.h Formatting. 2001-06-19 23:03:41 +00:00
cidgload.c * src/pfr/pfrcmap.c: Include pfrerror.h. 2007-07-07 07:30:40 +00:00
cidgload.h * src/truetype/ttobjs.c (tt_driver_done): Fix typo. 2004-05-06 11:48:35 +00:00
cidload.c * src/type1/t1tokens.h: Handle `ForceBold' keyword. This fixes 2008-08-04 18:46:37 +00:00
cidload.h Add support for the hexadicimal representation of binary data 2004-01-23 19:52:40 +00:00
cidobjs.c * src/truetype/ttobjs.c (tt_face_done), src/cff/cffobjs.c 2008-10-01 22:39:05 +00:00
cidobjs.h Formatting, copyright year updates. 2006-01-13 14:53:28 +00:00
cidparse.c (cid_parser_new): Exit properly if no `StartData' has been seen at all. 2007-06-01 07:49:31 +00:00
cidparse.h Add support for the hexadicimal representation of binary data 2004-01-23 19:52:40 +00:00
cidriver.c Fix support for subsetted CID-keyed CFFs. 2008-04-01 05:55:48 +00:00
cidriver.h formatting, copyright 2002-03-30 17:08:04 +00:00
cidtoken.h * docs/CHANGES: Updated. 2008-12-18 06:32:10 +00:00
module.mk FT_USE_MODULE declares things as: 2008-12-21 10:29:30 +00:00
rules.mk Completely revised FreeType's make management. 2003-06-09 04:46:30 +00:00
type1cid.c finishing function header formatting 2001-06-28 17:49:10 +00:00