diff options
author | Yang Tse <yangsita@gmail.com> | 2012-06-26 21:22:35 +0200 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2012-06-26 21:24:08 +0200 |
commit | bc0c3c62cc4c4899101fc50fb559470a9edaaa00 (patch) | |
tree | 1224c843fe4aaf11ff9889f95a322de021359c64 /m4 | |
parent | a85ba35816158186c45f69a920817f9aac02bc62 (diff) | |
download | c-ares-bc0c3c62cc4c4899101fc50fb559470a9edaaa00.tar.gz c-ares-bc0c3c62cc4c4899101fc50fb559470a9edaaa00.tar.bz2 c-ares-bc0c3c62cc4c4899101fc50fb559470a9edaaa00.zip |
cares-compilers.m4: -Wstrict-aliasing=3 for warning enabled gcc and clang builds
Diffstat (limited to 'm4')
-rw-r--r-- | m4/cares-compilers.m4 | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/m4/cares-compilers.m4 b/m4/cares-compilers.m4 index 7ee8e0d..d564792 100644 --- a/m4/cares-compilers.m4 +++ b/m4/cares-compilers.m4 @@ -15,7 +15,7 @@ #*************************************************************************** # File version for 'aclocal' use. Keep it a single number. -# serial 70 +# serial 71 dnl CARES_CHECK_COMPILER @@ -870,6 +870,7 @@ AC_DEFUN([CARES_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 @@ -960,6 +961,11 @@ AC_DEFUN([CARES_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" |