freetype/src/sfnt
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
..
Jamfile Formatting. 2005-03-01 02:13:50 +00:00
module.mk Added copyright messages to all Makefiles. 2000-10-17 03:38:43 +00:00
rules.mk * builds/amiga/makefile.os4 (WARNINGS), builds/compiler/gcc-dev.mk 2005-05-23 21:33:02 +00:00
sfdriver.c Various fixes for C and C++ compiling. 2005-03-03 17:09:08 +00:00
sfdriver.h finishing function header formatting 2001-06-28 17:49:10 +00:00
sferrors.h * include/freetype/internal/ftobjs.h: Don't include 2004-09-06 07:06:56 +00:00
sfnt.c Formatting. 2005-03-01 02:13:50 +00:00
sfobjs.c * src/base/ftrfork.c (raccess_guess_apple_generic): Mark 2005-05-22 20:33:09 +00:00
sfobjs.h * massive re-formatting changes to many, many source files. I don't 2002-08-27 20:20:29 +00:00
ttcmap.c * include/freetype/ftimage.h (FT_Raster_RenderFunc), 2005-05-11 20:04:35 +00:00
ttcmap.h Handle unsorted SFNT type 4 cmaps correctly (reported by Dirck 2005-05-09 22:11:36 +00:00
ttkern.c Various fixes for C and C++ compiling. 2005-03-03 17:09:08 +00:00
ttkern.h Formatting. 2005-03-01 02:13:50 +00:00
ttload.c Handle unsorted SFNT type 4 cmaps correctly (reported by Dirck 2005-05-09 22:11:36 +00:00
ttload.h Formatting. 2005-03-01 02:13:50 +00:00
ttpost.c * include/freetype/internal/bdftypes.h: removed obsolete header 2003-10-29 21:43:52 +00:00
ttpost.h * massive re-formatting changes to many, many source files. I don't 2002-08-27 20:20:29 +00:00
ttsbit0.c * include/freetype/freetype.h (FT_Vector_Transform), 2005-04-14 16:03:15 +00:00
ttsbit0.h * src/autofit/afglobal.c (af_face_globals_get_metrics): 2005-03-26 10:27:09 +00:00
ttsbit.c Formatting. 2005-03-01 02:13:50 +00:00
ttsbit.h * src/autofit/afdummy.c, src/autofit/afdummy.h 2005-03-02 11:24:23 +00:00