[Pkg-gnupg-commit] [gnupg2] 24/116: build: Enable gcc warnings to detect non-portable code.

Daniel Kahn Gillmor dkg at fifthhorseman.net
Tue Jan 24 04:40:50 UTC 2017


This is an automated email from the git hooks/post-receive script.

dkg pushed a commit to branch master
in repository gnupg2.

commit c52930d11fcc52515fcc09a1085bf118411566a8
Author: Werner Koch <wk at gnupg.org>
Date:   Mon Jan 2 12:59:10 2017 +0100

    build: Enable gcc warnings to detect non-portable code.
    
    --
    
    Signed-off-by: Werner Koch <wk at gnupg.org>
---
 configure.ac | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/configure.ac b/configure.ac
index 80d977c..fa206c9 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

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git



More information about the Pkg-gnupg-commit mailing list