freetype2/include/freetype/internal
Werner Lemberg 92aa527a1c * builds/amiga/makefile.os4 (WARNINGS), builds/compiler/gcc-dev.mk
(CFLAGS), builds/compiler/gcc.mk (CFLAGS): Remove
-fno-strict-aliasing.


Say you have `(Foo*)x' and want to assign, pass, or return it as
`(Bar*)'.  If you simply say `x' or `(Bar*)x', then the C compiler
would warn you that type casting incompatible pointer types breaks
strict-aliasing.  The solution is to cast to `(void*)' instead which
is the generic pointer type, so the compiler knows that it should
make no strict-aliasing assumption on `x'.  But the problem with
`(void*)x' is that seems like in C++, unlike C, `void*' is not a
generic pointer type and assigning `void*' to `Bar*' without a cast
causes an error.  The solution is to cast to `Bar*' too, with
`(Bar*)(void*)x' as the result -- this is what the patch does.

* include/freetype/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP),
include/freetype/cache/ftcmru.h (FTC_MRULIST_LOOKUP_CMP): Remove
cast on lvalue, use a temporary pointer instead.
Cast temporarily to (void*) to not break strict aliasing.

* include/freetype/internal/ftmemory.h (FT_MEM_ALLOC,
FT_MEM_REALLOC, FT_MEM_QALLOC, FT_MEM_QREALLOC, FT_MEM_FREE),
src/base/ftglyph.c (FT_Glyph_To_Bitmap): Cast temporarily to (void*)
to not break strict aliasing.

* src/base/ftinit.c (FT_USE_MODULE): Fix wrong type information.

* builds/unix/configure.ac (XX_CFLAGS): Remove -fno-strict-aliasing.

* src/sfnt/rules.mk (SFNT_DRV_SRC): Don't include ttsbit0.c --
it is currently loaded from ttsbit.c.


Other formatting.
2005-05-23 21:33:02 +00:00
..
services Formatting. 2005-03-08 11:43:36 +00:00
autohint.h updating sources to support the new FT_LOAD_TARGET_ constants 2002-08-27 22:34:20 +00:00
ftcalc.h Documentation updates, whitespace. 2004-12-13 23:16:59 +00:00
ftdebug.h Provide generic access to MacOS resource forks. 2004-02-25 12:58:54 +00:00
ftdriver.h Improve documentation. 2003-12-25 00:20:17 +00:00
ftgloadr.h * src/cff/cffdrivr.c (cff_get_glyph_name): Improve error message. 2003-12-12 15:38:39 +00:00
ftmemory.h * builds/amiga/makefile.os4 (WARNINGS), builds/compiler/gcc-dev.mk 2005-05-23 21:33:02 +00:00
ftobjs.h * src/base/ftutil.c: Include FT_INTERNAL_OBJECTS_H. 2005-03-03 23:05:29 +00:00
ftrfork.h Provide generic access to MacOS resource forks. 2004-02-25 12:58:54 +00:00
ftserv.h * include/freetype/internal/ftserv.h (FT_FACE_FIND_GLOBAL_SERVICE) 2005-05-09 22:29:36 +00:00
ftstream.h Formatting. 2005-03-16 01:49:54 +00:00
fttrace.h Formatting. 2005-03-01 02:13:50 +00:00
ftvalid.h Adding OpenType validation module. The code is based on the 2004-09-10 14:39:00 +00:00
internal.h * include/freetype/internal/ftobjs.h: Don't include 2004-09-06 07:06:56 +00:00
pcftypes.h Cleanups. 2003-04-22 07:49:24 +00:00
psaux.h * include/freetype/internal/psaux.h (T1_ParseState): New 2004-05-13 12:59:59 +00:00
pshints.h * src/autohint/ahhint.c (ah_hinter_hint_edges): Removed. Just a 2003-06-03 11:51:43 +00:00
sfnt.h Formatting. 2005-03-01 02:13:50 +00:00
t1types.h Add support for the hexadicimal representation of binary data 2004-01-23 19:52:40 +00:00
tttypes.h Handle malformed `loca' table entries. 2005-05-05 07:44:20 +00:00