gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnurl] 189/205: curl-compilers.m4: turn implicit function


From: gnunet
Subject: [GNUnet-SVN] [gnurl] 189/205: curl-compilers.m4: turn implicit function declarations into errors
Date: Thu, 20 Apr 2017 16:22:09 +0200

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

ng0 pushed a commit to annotated tag gnurl-7.54.0
in repository gnurl.

commit 9168e2470d5203661faa5500361b7eb493aa24dd
Author: Marcel Raad <address@hidden>
AuthorDate: Fri Apr 14 12:48:27 2017 +0200

    curl-compilers.m4: turn implicit function declarations into errors
    
    This adds -Werror-implicit-function-declaration for GCC 2.95+ so that
    these errors are visible at the point where they occur instead of only
    at link time.
    Implicit function declarations are illegal in C99 and C++ anyway, and
    the same warning has been turned into an error for ICC in commit
    3072c5b8a127057aa922b7c51051bbb4a630b091.
    
    Ref: https://gcc.gnu.org/onlinedocs/gcc-2.95.2/gcc_2.html#SEC8
    Ref: https://curl.haxx.se/mail/lib-2017-04/0001.html
    Closes https://github.com/curl/curl/pull/1419
---
 m4/curl-compilers.m4 | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/m4/curl-compilers.m4 b/m4/curl-compilers.m4
index 3219baf6b..19462582f 100644
--- a/m4/curl-compilers.m4
+++ b/m4/curl-compilers.m4
@@ -577,8 +577,11 @@ AC_DEFUN([CURL_SET_COMPILER_BASIC_OPTS], [
         #
       GNU_C)
         #
-        dnl Placeholder
-        tmp_CFLAGS="$tmp_CFLAGS"
+        dnl turn implicit-function-declaration warning into error,
+        dnl at least gcc 2.95 and later support this
+        if test "$compiler_num" -ge "295"; then
+          tmp_CFLAGS="$tmp_CFLAGS -Werror-implicit-function-declaration"
+        fi
         ;;
         #
       HP_UX_C)

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]