From 41b162f8acec50f7bafd00a60bd8257650633ac0 Mon Sep 17 00:00:00 2001 From: Pauli Nieminen Date: Sat, 25 Jul 2009 16:28:21 +0300 Subject: [PATCH 3/4] Remove -fbad-function-cast and add -fstrict-aliasing=2. -fbad-function-cast generates too much warnings from valid code to be used. -fstrict-aliasing helps gcc to optimize loops assigning value from memory in loop. --- xorg-macros.m4.in | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/xorg-macros.m4.in b/xorg-macros.m4.in index d10aea6..a2e0f2c 100644 --- a/xorg-macros.m4.in +++ b/xorg-macros.m4.in @@ -440,8 +440,7 @@ AC_DEFUN([XORG_CWARNFLAGS], [ AC_REQUIRE([AC_PROG_CC]) if test "x$GCC" = xyes ; then CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ --Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ --Wbad-function-cast" +-Wmissing-declarations -Wnested-externs -fstrict-aliasing=2" case `$CC -dumpversion` in 3.4.* | 4.*) CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement" -- 1.6.3.3