freetype2/builds
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
..
amiga FT_USE_MODULE declares things as: 2008-12-21 10:29:30 +00:00
ansi * builds/*/*def.mk, builds/*/detect.mk (CAT): Define to either `cat' 2006-12-09 20:01:43 +00:00
atari Remove trailing whitespace. From Alexei. 2007-01-16 06:11:27 +00:00
beos * builds/*/*def.mk, builds/*/detect.mk (CAT): Define to either `cat' 2006-12-09 20:01:43 +00:00
compiler Adjustments for Visual C++ 8.0, as reported by Rainer Deyke. 2008-03-23 14:53:44 +00:00
dos * builds/*/*def.mk, builds/*/detect.mk (CAT): Define to either `cat' 2006-12-09 20:01:43 +00:00
mac {src/base,builds/mac}/ftobjs.c: Include FT_TRUETYPE_TAGS_H for multi build 2008-10-05 03:08:10 +00:00
os2 * builds/*/*def.mk, builds/*/detect.mk (CAT): Define to either `cat' 2006-12-09 20:01:43 +00:00
symbian add copyright notices 2008-03-06 22:11:30 +00:00
unix * src/base/ftobjs.c (open_face_PS_from_sfnt_stream): Remove compiler 2008-10-04 11:39:03 +00:00
vms * src/base/ftobjs.c (open_face_PS_from_sfnt_stream): Remove compiler 2008-10-04 11:39:03 +00:00
win32 * Version 2.3.7 released. 2008-06-29 07:43:41 +00:00
detect.mk * builds/modules.mk (CLOSE_MODULE, REMOVE_MODULE), builds/detect.mk 2008-02-11 08:22:40 +00:00
exports.mk * Jamfile, README, builds/win32/visualc/freetype.dsp, 2007-01-10 14:18:15 +00:00
freetype.mk * builds/freetype.mk (BASE_H): Rename to... 2008-10-02 06:48:10 +00:00
link_dos.mk Completely revised FreeType's make management. 2003-06-09 04:46:30 +00:00
link_std.mk Completely revised FreeType's make management. 2003-06-09 04:46:30 +00:00
modules.mk * builds/modules.mk (CLOSE_MODULE, REMOVE_MODULE), builds/detect.mk 2008-02-11 08:22:40 +00:00
newline * include/freetype/fttrigon.h, src/base/fttrigon.c, src/base/ftbase.c, 2001-05-11 14:25:57 +00:00
toplevel.mk Since FreeType uses `$(value ...)', we now need GNU make 3.80 or 2008-07-05 06:35:28 +00:00