aboutsummaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2012-06-26 21:22:36 +0200
committerYang Tse <yangsita@gmail.com>2012-06-26 21:24:30 +0200
commitf1474db3600172804d6f79d30e1127c6c7efa066 (patch)
tree58bc81a1a738938fb5baa3ed1aec6f7b26308e56 /m4
parenta8478fc8d3ee5ca8ad6264b18ca2896298c33a65 (diff)
curl-compilers.m4: -Wstrict-aliasing=3 for warning enabled gcc and clang builds
Diffstat (limited to 'm4')
-rw-r--r--m4/curl-compilers.m48
1 files changed, 7 insertions, 1 deletions
diff --git a/m4/curl-compilers.m4 b/m4/curl-compilers.m4
index 2752f65e4..29507bae3 100644
--- a/m4/curl-compilers.m4
+++ b/m4/curl-compilers.m4
@@ -21,7 +21,7 @@
#***************************************************************************
# File version for 'aclocal' use. Keep it a single number.
-# serial 61
+# serial 62
dnl CURL_CHECK_COMPILER
@@ -875,6 +875,7 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
tmp_CFLAGS="$tmp_CFLAGS -Wcast-align"
tmp_CFLAGS="$tmp_CFLAGS -Wno-system-headers"
tmp_CFLAGS="$tmp_CFLAGS -Wshorten-64-to-32"
+ tmp_CFLAGS="$tmp_CFLAGS -Wstrict-aliasing=3"
#
dnl Only clang 1.1 or later
if test "$compiler_num" -ge "101"; then
@@ -965,6 +966,11 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
tmp_CFLAGS="$tmp_CFLAGS -Wdeclaration-after-statement"
fi
#
+ dnl Only gcc 4.0 or later
+ if test "$compiler_num" -ge "400"; then
+ tmp_CFLAGS="$tmp_CFLAGS -Wstrict-aliasing=3"
+ fi
+ #
dnl Only gcc 4.2 or later
if test "$compiler_num" -ge "402"; then
tmp_CFLAGS="$tmp_CFLAGS -Wcast-align"