summaryrefslogtreecommitdiff
path: root/include/freetype
diff options
context:
space:
mode:
authorWerner Lemberg <wl@gnu.org>2008-12-21 10:29:30 +0000
committerWerner Lemberg <wl@gnu.org>2008-12-21 10:29:30 +0000
commitce33a312daca1944e61a11c4e7522d37f4da4f4d (patch)
tree6718615bc35449a73f471285d4ee3596b057ce8a /include/freetype
parentb6fa8451461b51cc793a4cd0ab17350e3e6ae9fe (diff)
downloadfreetype2-ce33a312daca1944e61a11c4e7522d37f4da4f4d.tar.gz
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.
Diffstat (limited to 'include/freetype')
-rw-r--r--include/freetype/config/ftmodule.h36
1 files changed, 18 insertions, 18 deletions
diff --git a/include/freetype/config/ftmodule.h b/include/freetype/config/ftmodule.h
index d92b0ee6a..76d271a74 100644
--- a/include/freetype/config/ftmodule.h
+++ b/include/freetype/config/ftmodule.h
@@ -10,23 +10,23 @@
*
*/
-FT_USE_MODULE(autofit_module_class)
-FT_USE_MODULE(tt_driver_class)
-FT_USE_MODULE(t1_driver_class)
-FT_USE_MODULE(cff_driver_class)
-FT_USE_MODULE(t1cid_driver_class)
-FT_USE_MODULE(pfr_driver_class)
-FT_USE_MODULE(t42_driver_class)
-FT_USE_MODULE(winfnt_driver_class)
-FT_USE_MODULE(pcf_driver_class)
-FT_USE_MODULE(psaux_module_class)
-FT_USE_MODULE(psnames_module_class)
-FT_USE_MODULE(pshinter_module_class)
-FT_USE_MODULE(ft_raster1_renderer_class)
-FT_USE_MODULE(sfnt_module_class)
-FT_USE_MODULE(ft_smooth_renderer_class)
-FT_USE_MODULE(ft_smooth_lcd_renderer_class)
-FT_USE_MODULE(ft_smooth_lcdv_renderer_class)
-FT_USE_MODULE(bdf_driver_class)
+FT_USE_MODULE( FT_Module_Class, autofit_module_class )
+FT_USE_MODULE( FT_Driver_ClassRec, tt_driver_class )
+FT_USE_MODULE( FT_Driver_ClassRec, t1_driver_class )
+FT_USE_MODULE( FT_Driver_ClassRec, cff_driver_class )
+FT_USE_MODULE( FT_Driver_ClassRec, t1cid_driver_class )
+FT_USE_MODULE( FT_Driver_ClassRec, pfr_driver_class )
+FT_USE_MODULE( FT_Driver_ClassRec, t42_driver_class )
+FT_USE_MODULE( FT_Driver_ClassRec, winfnt_driver_class )
+FT_USE_MODULE( FT_Driver_ClassRec, pcf_driver_class )
+FT_USE_MODULE( FT_Module_Class, psaux_module_class )
+FT_USE_MODULE( FT_Module_Class, psnames_module_class )
+FT_USE_MODULE( FT_Module_Class, pshinter_module_class )
+FT_USE_MODULE( FT_Renderer_Class, ft_raster1_renderer_class )
+FT_USE_MODULE( FT_Module_Class, sfnt_module_class )
+FT_USE_MODULE( FT_Renderer_Class, ft_smooth_renderer_class )
+FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcd_renderer_class )
+FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcdv_renderer_class )
+FT_USE_MODULE( FT_Driver_ClassRec, bdf_driver_class )
/* EOF */