[gtkhtml] Disable strict aliasing optimization.



commit 53e0b83f80172a779e4972067c5e9a9c6b9c94c2
Author: Matthew Barnes <mbarnes redhat com>
Date:   Tue Feb 2 12:27:38 2010 -0500

    Disable strict aliasing optimization.

 configure.ac |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 9f13de8..dd51278 100644
--- a/configure.ac
+++ b/configure.ac
@@ -74,7 +74,14 @@ dnl
 dnl	-Wmissing-format-attribute
 dnl	-Wshadow
 
-CFLAGS="$CFLAGS $WARNING_FLAGS"
+dnl GCC 4.4 got more aggressive in it's aliasing optimizations, changing
+dnl behavior that -- according to the C99 standard -- is supposed to be
+dnl undefined.  We may still have aliasing abuses lying around that rely
+dnl on GCC's previous "undefined" behavior but are hidden by type casts,
+dnl so disable the strict-aliasing optimzation until GCC (or even LLVM)
+dnl learns how to detect them and warn us about it.
+dnl XXX This really belongs in AM_CFLAGS.
+CFLAGS="$CFLAGS $WARNING_FLAGS -fno-strict-aliasing"
 
 dnl *********************
 dnl Necessary programs



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]