[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 111/153: configure: conditionally enable pedantic-e
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 111/153: configure: conditionally enable pedantic-errors |
Date: |
Tue, 11 Sep 2018 12:53:02 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit d5c0351055d5709da8f3e16c91348092fdb481aa
Author: Marcel Raad <address@hidden>
AuthorDate: Mon Jul 9 18:38:23 2018 +0200
configure: conditionally enable pedantic-errors
Enable pedantic-errors for GCC >= 5 with --enable-werror. Before GCC 5,
pedantic-errors was synonymous to -Werror=pedantic [0], which is still
the case for clang [1]. With GCC 5, it became complementary [2].
Also fix a resulting error in acinclude.m4 as main's return type was
missing, which is illegal in C99.
[0] https://gcc.gnu.org/onlinedocs/gcc-4.9.0/gcc/Warning-Options.html
[1]
https://clang.llvm.org/docs/UsersManual.html#options-to-control-error-and-warning-messages
[2] https://gcc.gnu.org/onlinedocs/gcc-5.1.0/gcc/Warning-Options.html
Closes https://github.com/curl/curl/pull/2747
---
acinclude.m4 | 2 +-
configure.ac | 7 +++++++
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/acinclude.m4 b/acinclude.m4
index f32e86cda..355ee3a61 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -2158,7 +2158,7 @@ AC_DEFUN([CURL_VERIFY_RUNTIMELIBS], [
dnl point also is available run-time!
AC_MSG_CHECKING([run-time libs availability])
CURL_RUN_IFELSE([
-main()
+int main()
{
return 0;
}
diff --git a/configure.ac b/configure.ac
index 18b7ae0f1..ff8f5df9b 100755
--- a/configure.ac
+++ b/configure.ac
@@ -61,6 +61,13 @@ AC_SUBST(CONFIGURE_OPTIONS)
CURL_CFLAG_EXTRAS=""
if test X"$want_werror" = Xyes; then
CURL_CFLAG_EXTRAS="-Werror"
+ if test "$compiler_id" = "GNU_C"; then
+ dnl enable -pedantic-errors for GCC 5 and later,
+ dnl as before that it was the same as -Werror=pedantic
+ if test "$compiler_num" -ge "500"; then
+ CURL_CFLAG_EXTRAS="$CURL_CFLAG_EXTRAS -pedantic-errors"
+ fi
+ fi
fi
AC_SUBST(CURL_CFLAG_EXTRAS)
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 118/153: http2: abort the send_callback if not setup yet, (continued)
- [GNUnet-SVN] [gnurl] 118/153: http2: abort the send_callback if not setup yet, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 117/153: http2: remove four unused nghttp2 callbacks, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 123/153: gopher: Do not translate `?' to `%09', gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 120/153: RELEASE-NOTES: synced, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 122/153: cookie tests: treat files as text, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 114/153: Enable more GCC warnings, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 119/153: Tests: fixes for Windows, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 121/153: libcurl-thread.3: expand somewhat on the NO_SIGNAL motivation, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 112/153: curl-compilers: enable -Wbad-function-cast on GCC, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 115/153: test1148: disable if decimal separator is not point, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 111/153: configure: conditionally enable pedantic-errors,
gnunet <=
- [GNUnet-SVN] [gnurl] 116/153: x509asn1: use FALLTHROUGH, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 100/153: http2: make sure to send after RST_STREAM, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 128/153: docs: clarify NO_PROXY env variable functionality, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 99/153: test1268: check the stderr output as "text", gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 106/153: SSLCERTS: improve the openssl command line, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 108/153: INTERNALS: require GnuTLS >= 2.11.3, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 89/153: travis: disable h2 torture tests for "coverage", gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 93/153: CMake: CMake config files are defining CURL_STATICLIB for static builds, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 97/153: curl: warn the user if a given file name looks like an option, gnunet, 2018/09/11
- [GNUnet-SVN] [gnurl] 102/153: upload: allocate upload buffer on-demand, gnunet, 2018/09/11