diff options
author | Werner Koch <[email protected]> | 2017-01-02 11:59:10 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2017-01-02 11:59:36 +0000 |
commit | c52930d11fcc52515fcc09a1085bf118411566a8 (patch) | |
tree | a51f6af30fa48fabc5d62a412f44955833b00017 | |
parent | gpgscm: Fail if too many arguments are given. (diff) | |
download | gnupg-c52930d11fcc52515fcc09a1085bf118411566a8.tar.gz gnupg-c52930d11fcc52515fcc09a1085bf118411566a8.zip |
build: Enable gcc warnings to detect non-portable code.
--
Signed-off-by: Werner Koch <[email protected]>
-rw-r--r-- | configure.ac | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 80d977c94..fa206c991 100644 --- a/configure.ac +++ b/configure.ac @@ -1574,6 +1574,15 @@ if test "$GCC" = yes; then if test x"$_gcc_wopt" = xyes ; then mycflags="$mycflags -Wdeclaration-after-statement" fi + + AC_MSG_CHECKING([if gcc supports -Wlogical-op and -Wvla]) + CFLAGS="-Wlogical-op -Wvla" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],_gcc_wopt=yes,_gcc_wopt=no) + AC_MSG_RESULT($_gcc_wopt) + if test x"$_gcc_wopt" = xyes ; then + mycflags="$mycflags -Wlogical-op -Wvla" + fi + else mycflags="$mycflags -Wall" fi |