summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2013-12-17 01:12:19 +0100
committerHaru <haru@dotalux.com>2013-12-17 01:12:38 +0100
commit3cd9f8d14eaccaffaa642b5e46f50493c213e7d8 (patch)
treee912516b40e7e351d0dad15310cb2d8e5fc88768
parent15a0f6dea6f4f3c5adc9a1bc9e7e8be81cc49c48 (diff)
downloadhercules-3cd9f8d14eaccaffaa642b5e46f50493c213e7d8.tar.gz
hercules-3cd9f8d14eaccaffaa642b5e46f50493c213e7d8.tar.bz2
hercules-3cd9f8d14eaccaffaa642b5e46f50493c213e7d8.tar.xz
hercules-3cd9f8d14eaccaffaa642b5e46f50493c213e7d8.zip
Increased warnings level in the unix build scripts
- They are now on par with the Xcode project (and similar to the MSVC ones) - this will make it easier to notice issues before committing in future. - If this causes, on your system, warnings that we didn't detect, please let us know! Signed-off-by: Haru <haru@dotalux.com>
-rwxr-xr-xconfigure267
-rw-r--r--configure.in162
2 files changed, 408 insertions, 21 deletions
diff --git a/configure b/configure
index 82466cad8..28c9f9361 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
#! /bin/sh
-# From configure.in 4d13474.
+# From configure.in 547ee9a.
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69.
#
@@ -4566,7 +4566,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
-CFLAGS="$CFLAGS -pipe -ffast-math -Wall -Wno-sign-compare"
+CFLAGS="$CFLAGS -pipe -ffast-math -Wall -Wextra -Wno-sign-compare"
CPPFLAGS="$CPPFLAGS -I../common"
@@ -4994,11 +4994,57 @@ fi
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wno-maybe-uninitialized" >&5
+$as_echo_n "checking whether $CC supports -Wno-maybe-uninitialized... " >&6; }
+OLD_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -Wno-maybe-uninitialized"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int foo;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC can actually use -Wno-maybe-uninitialized" >&5
+$as_echo_n "checking whether $CC can actually use -Wno-maybe-uninitialized... " >&6; }
+ # Note: -Werror must be before -Wno-maybe-uninitialized, otherwise it does not do anything
+ CFLAGS="$OLD_CFLAGS -Werror -Wno-maybe-uninitialized"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int foo;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ CFLAGS="$OLD_CFLAGS -Wno-maybe-uninitialized"
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$OLD_CFLAGS"
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wno-pointer-sign" >&5
-$as_echo_n "checking whether $CC supports -Wno-pointer-sign... " >&6; }
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$OLD_CFLAGS"
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wno-clobbered" >&5
+$as_echo_n "checking whether $CC supports -Wno-clobbered... " >&6; }
OLD_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS -Wno-pointer-sign"
+CFLAGS="$CFLAGS -Wno-clobbered"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int foo;
@@ -5007,11 +5053,10 @@ if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC can actually use -Wno-pointer-sign" >&5
-$as_echo_n "checking whether $CC can actually use -Wno-pointer-sign... " >&6; }
- # This option causes warnings in C++ mode
- # Note: -Werror must be before -Wno-pointer-sign, otherwise it does not do anything
- CFLAGS="$OLD_CFLAGS -Werror -Wno-pointer-sign"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC can actually use -Wno-clobbered" >&5
+$as_echo_n "checking whether $CC can actually use -Wno-clobbered... " >&6; }
+ # Note: -Werror must be before -Wno-clobbered, otherwise it does not do anything
+ CFLAGS="$OLD_CFLAGS -Werror -Wno-clobbered"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int foo;
@@ -5020,7 +5065,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- CFLAGS="$OLD_CFLAGS -Wno-pointer-sign"
+ CFLAGS="$OLD_CFLAGS -Wno-clobbered"
else
@@ -5043,6 +5088,182 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wempty-body" >&5
+$as_echo_n "checking whether $CC supports -Wempty-body... " >&6; }
+OLD_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -Wempty-body"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int foo;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$OLD_CFLAGS"
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wnewline-eof" >&5
+$as_echo_n "checking whether $CC supports -Wnewline-eof... " >&6; }
+OLD_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -Wnewline-eof"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int foo;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$OLD_CFLAGS"
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wshadow" >&5
+$as_echo_n "checking whether $CC supports -Wshadow... " >&6; }
+OLD_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -Wshadow"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int foo;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$OLD_CFLAGS"
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wint-conversion" >&5
+$as_echo_n "checking whether $CC supports -Wint-conversion... " >&6; }
+OLD_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -Wenum-conversion"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int foo;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$OLD_CFLAGS"
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wenum-conversion" >&5
+$as_echo_n "checking whether $CC supports -Wenum-conversion... " >&6; }
+OLD_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -Wenum-conversion"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int foo;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$OLD_CFLAGS"
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wshorten-64-to-32" >&5
+$as_echo_n "checking whether $CC supports -Wshorten-64-to-32... " >&6; }
+OLD_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -Wshorten-64-to-32"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int foo;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$OLD_CFLAGS"
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wconstant-conversion" >&5
+$as_echo_n "checking whether $CC supports -Wconstant-conversion... " >&6; }
+OLD_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -Wconstant-conversion"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int foo;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$OLD_CFLAGS"
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wbool-conversion" >&5
+$as_echo_n "checking whether $CC supports -Wbool-conversion... " >&6; }
+OLD_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -Wbool-conversion"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int foo;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$OLD_CFLAGS"
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wno-switch" >&5
$as_echo_n "checking whether $CC supports -Wno-switch... " >&6; }
OLD_CFLAGS="$CFLAGS"
@@ -5065,6 +5286,28 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wno-missing-field-initializers" >&5
+$as_echo_n "checking whether $CC supports -Wno-missing-field-initializers... " >&6; }
+OLD_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -Wno-missing-field-initializers"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int foo;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ CFLAGS="$OLD_CFLAGS"
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fPIC" >&5
$as_echo_n "checking whether $CC supports -fPIC... " >&6; }
OLD_CFLAGS="$CFLAGS"
@@ -5470,7 +5713,7 @@ fi
case $enable_debug in
"no")
# default value
- CFLAGS="$CFLAGS -Wno-unused -Wno-parentheses"
+# CFLAGS="$CFLAGS -Wno-unused -Wno-parentheses"
;;
"yes")
CFLAGS="$CFLAGS -g -DDEBUG"
diff --git a/configure.in b/configure.in
index 7db4ceda6..e8e2eba3f 100644
--- a/configure.in
+++ b/configure.in
@@ -433,7 +433,7 @@ AC_PATH_PROG(AR, ar)
AC_LANG([C])
-CFLAGS="$CFLAGS -pipe -ffast-math -Wall -Wno-sign-compare"
+CFLAGS="$CFLAGS -pipe -ffast-math -Wall -Wextra -Wno-sign-compare"
CPPFLAGS="$CPPFLAGS -I../common"
@@ -563,23 +563,50 @@ if test "$enable_lto" != "no" ; then
fi
+AC_MSG_CHECKING([whether $CC supports -Wno-maybe-uninitialized])
+OLD_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -Wno-maybe-uninitialized"
+AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE([int foo;])],
+ [
+ AC_MSG_RESULT([yes])
+ AC_MSG_CHECKING([whether $CC can actually use -Wno-maybe-uninitialized])
+ # Note: -Werror must be before -Wno-maybe-uninitialized, otherwise it does not do anything
+ CFLAGS="$OLD_CFLAGS -Werror -Wno-maybe-uninitialized"
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE([int foo;])],
+ [
+ AC_MSG_RESULT([yes])
+ CFLAGS="$OLD_CFLAGS -Wno-maybe-uninitialized"
+ ],
+ [
+ AC_MSG_RESULT([no])
+ CFLAGS="$OLD_CFLAGS"
+ ]
+ )
+ ],
+ [
+ AC_MSG_RESULT([no])
+ CFLAGS="$OLD_CFLAGS"
+ ]
+)
+
-AC_MSG_CHECKING([whether $CC supports -Wno-pointer-sign])
+AC_MSG_CHECKING([whether $CC supports -Wno-clobbered])
OLD_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS -Wno-pointer-sign"
+CFLAGS="$CFLAGS -Wno-clobbered"
AC_COMPILE_IFELSE(
[AC_LANG_SOURCE([int foo;])],
[
AC_MSG_RESULT([yes])
- AC_MSG_CHECKING([whether $CC can actually use -Wno-pointer-sign])
- # This option causes warnings in C++ mode
- # Note: -Werror must be before -Wno-pointer-sign, otherwise it does not do anything
- CFLAGS="$OLD_CFLAGS -Werror -Wno-pointer-sign"
+ AC_MSG_CHECKING([whether $CC can actually use -Wno-clobbered])
+ # Note: -Werror must be before -Wno-clobbered, otherwise it does not do anything
+ CFLAGS="$OLD_CFLAGS -Werror -Wno-clobbered"
AC_COMPILE_IFELSE(
[AC_LANG_SOURCE([int foo;])],
[
AC_MSG_RESULT([yes])
- CFLAGS="$OLD_CFLAGS -Wno-pointer-sign"
+ CFLAGS="$OLD_CFLAGS -Wno-clobbered"
],
[
AC_MSG_RESULT([no])
@@ -594,6 +621,110 @@ AC_COMPILE_IFELSE(
)
+AC_MSG_CHECKING([whether $CC supports -Wempty-body])
+OLD_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -Wempty-body"
+AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE([int foo;])],
+ [AC_MSG_RESULT([yes])],
+ [
+ AC_MSG_RESULT([no])
+ CFLAGS="$OLD_CFLAGS"
+ ]
+)
+
+
+AC_MSG_CHECKING([whether $CC supports -Wnewline-eof])
+OLD_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -Wnewline-eof"
+AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE([int foo;])],
+ [AC_MSG_RESULT([yes])],
+ [
+ AC_MSG_RESULT([no])
+ CFLAGS="$OLD_CFLAGS"
+ ]
+)
+
+
+AC_MSG_CHECKING([whether $CC supports -Wshadow])
+OLD_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -Wshadow"
+AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE([int foo;])],
+ [AC_MSG_RESULT([yes])],
+ [
+ AC_MSG_RESULT([no])
+ CFLAGS="$OLD_CFLAGS"
+ ]
+)
+
+
+AC_MSG_CHECKING([whether $CC supports -Wint-conversion])
+OLD_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -Wenum-conversion"
+AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE([int foo;])],
+ [AC_MSG_RESULT([yes])],
+ [
+ AC_MSG_RESULT([no])
+ CFLAGS="$OLD_CFLAGS"
+ ]
+)
+
+
+AC_MSG_CHECKING([whether $CC supports -Wenum-conversion])
+OLD_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -Wenum-conversion"
+AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE([int foo;])],
+ [AC_MSG_RESULT([yes])],
+ [
+ AC_MSG_RESULT([no])
+ CFLAGS="$OLD_CFLAGS"
+ ]
+)
+
+
+AC_MSG_CHECKING([whether $CC supports -Wshorten-64-to-32])
+OLD_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -Wshorten-64-to-32"
+AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE([int foo;])],
+ [AC_MSG_RESULT([yes])],
+ [
+ AC_MSG_RESULT([no])
+ CFLAGS="$OLD_CFLAGS"
+ ]
+)
+
+
+AC_MSG_CHECKING([whether $CC supports -Wconstant-conversion])
+OLD_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -Wconstant-conversion"
+AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE([int foo;])],
+ [AC_MSG_RESULT([yes])],
+ [
+ AC_MSG_RESULT([no])
+ CFLAGS="$OLD_CFLAGS"
+ ]
+)
+
+
+AC_MSG_CHECKING([whether $CC supports -Wbool-conversion])
+OLD_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -Wbool-conversion"
+AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE([int foo;])],
+ [AC_MSG_RESULT([yes])],
+ [
+ AC_MSG_RESULT([no])
+ CFLAGS="$OLD_CFLAGS"
+ ]
+)
+
+
AC_MSG_CHECKING([whether $CC supports -Wno-switch])
OLD_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Wno-switch"
@@ -607,6 +738,19 @@ AC_COMPILE_IFELSE(
)
+AC_MSG_CHECKING([whether $CC supports -Wno-missing-field-initializers])
+OLD_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS -Wno-missing-field-initializers"
+AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE([int foo;])],
+ [AC_MSG_RESULT([yes])],
+ [
+ AC_MSG_RESULT([no])
+ CFLAGS="$OLD_CFLAGS"
+ ]
+)
+
+
AC_MSG_CHECKING([whether $CC supports -fPIC])
OLD_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -fPIC"
@@ -870,7 +1014,7 @@ fi
case $enable_debug in
"no")
# default value
- CFLAGS="$CFLAGS -Wno-unused -Wno-parentheses"
+# CFLAGS="$CFLAGS -Wno-unused -Wno-parentheses"
;;
"yes")
CFLAGS="$CFLAGS -g -DDEBUG"