1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

build: Enable gcc warnings to detect non-portable code.

--

Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2017-01-02 12:59:10 +01:00
parent b0e14bd6ff
commit c52930d11f
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B

View File

@ -1574,6 +1574,15 @@ if test "$GCC" = yes; then
if test x"$_gcc_wopt" = xyes ; then if test x"$_gcc_wopt" = xyes ; then
mycflags="$mycflags -Wdeclaration-after-statement" mycflags="$mycflags -Wdeclaration-after-statement"
fi 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 else
mycflags="$mycflags -Wall" mycflags="$mycflags -Wall"
fi fi