[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: maint: build: do not enable c++ warnings on 0 when nullptr is not s
From: |
Akim Demaille |
Subject: |
FYI: maint: build: do not enable c++ warnings on 0 when nullptr is not supported. |
Date: |
Fri, 11 May 2012 10:14:37 +0200 |
Installed in maint. There remains an error to address before
the beta.
From 7e3510e6dd3baa34fcb985173befdafbbf3569a5 Mon Sep 17 00:00:00 2001
From: Akim Demaille <address@hidden>
Date: Wed, 9 May 2012 11:20:18 +0200
Subject: [PATCH 2/2] build: do not enable c++ warnings on 0 when nullptr is
not supported.
* configure.ac (WARN_CXXFLAGS): Enable -Wzero-as-null-pointer-constant
only when nullptr is supported..
---
configure.ac | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 9395568..6a75d7b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -70,7 +70,7 @@ if test "$enable_gcc_warnings" = yes; then
-Wcast-qual -Wformat -Wpointer-arith -Wwrite-strings'
warn_c='-Wbad-function-cast -Wmissing-declarations -Wmissing-prototypes
-Wshadow -Wstrict-prototypes'
- warn_cxx='-Wnoexcept -Wzero-as-null-pointer-constant'
+ warn_cxx='-Wnoexcept'
AC_LANG_PUSH([C])
for i in $warn_common $warn_c;
do
@@ -87,6 +87,8 @@ if test "$enable_gcc_warnings" = yes; then
do
gl_WARN_ADD([$i], [WARN_CXXFLAGS])
done
+ gl_WARN_ADD([ -Wzero-as-null-pointer-constant], [WARN_CXXFLAGS],
+ [AC_LANG_PROGRAM([], [nullptr])])
gl_WARN_ADD([-Werror], [WERROR_CXXFLAGS])
# Warnings for the test suite only.
gl_WARN_ADD([-Wundef], [WARN_CXXFLAGS_TEST])
--
1.7.10.1
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- FYI: maint: build: do not enable c++ warnings on 0 when nullptr is not supported.,
Akim Demaille <=