[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 15edd3b: Upgrade g++ dialect to C++17
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 15edd3b: Upgrade g++ dialect to C++17 |
Date: |
Thu, 31 Aug 2017 18:26:54 -0400 (EDT) |
branch: master
commit 15edd3b9f8a1847252a3a38ab29796104da3253b
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Upgrade g++ dialect to C++17
See:
http://lists.nongnu.org/archive/html/lmi/2017-08/msg00068.html
---
bourn_cast.hpp | 2 +-
workhorse.make | 33 +++++++++++++++++++++------------
2 files changed, 22 insertions(+), 13 deletions(-)
diff --git a/bourn_cast.hpp b/bourn_cast.hpp
index 97bce09..4453aa2 100644
--- a/bourn_cast.hpp
+++ b/bourn_cast.hpp
@@ -174,7 +174,7 @@ inline To bourn_cast(From from, std::true_type,
std::false_type)
using from_traits = std::numeric_limits<From>;
static_assert(to_traits::is_integer && !from_traits::is_integer, "");
- static From const limit = std::ldexp(From(1), to_traits::digits);
+ constexpr From limit = std::ldexp(From(1), to_traits::digits);
constexpr bool is_twos_complement(~To(0) == -To(1));
diff --git a/workhorse.make b/workhorse.make
index c85ce3c..50cd7b9 100644
--- a/workhorse.make
+++ b/workhorse.make
@@ -374,7 +374,7 @@ else ifeq (3.4.5,$(gcc_version))
# Use a correct snprintf() implementation:
# http://article.gmane.org/gmane.comp.gnu.mingw.user/27539
cxx_standard += -posix
-else ifneq (,$(filter $(gcc_version), 4.9.1 4.9.2 6.3.0))
+else ifneq (,$(filter $(gcc_version), 4.9.1 4.9.2))
# See:
# http://lists.nongnu.org/archive/html/lmi/2015-12/msg00028.html
# http://lists.nongnu.org/archive/html/lmi/2015-12/msg00040.html
@@ -387,6 +387,26 @@ else ifneq (,$(filter $(gcc_version), 4.9.1 4.9.2 6.3.0))
-Wno-unused-variable \
cxx_standard := -std=c++11
+else ifneq (,$(filter $(gcc_version), 6.3.0))
+ # See:
+ # http://lists.nongnu.org/archive/html/lmi/2015-12/msg00028.html
+ # http://lists.nongnu.org/archive/html/lmi/2015-12/msg00040.html
+ # XMLWRAPP !! '-Wno-deprecated-declarations' needed for auto_ptr
+ gcc_version_specific_warnings := \
+ -Wno-conversion \
+ -Wno-deprecated-declarations \
+ -Wno-parentheses \
+ -Wno-unused-local-typedefs \
+ -Wno-unused-variable \
+
+ cxx_standard := -std=c++17
+
+# The default '-fno-rounding-math' means something like
+ # #pragma STDC FENV ACCESS OFF
+ # which causes harm while bringing no countervailing benefit--see:
+ # http://lists.nongnu.org/archive/html/lmi/2017-08/msg00045.html
+ c_standard += -frounding-math
+ cxx_standard += -frounding-math
endif
treat_warnings_as_errors := -pedantic-errors -Werror
@@ -482,17 +502,6 @@ endif
# Since at least gcc-3.4.2, -Wmissing-prototypes is deprecated as
# being redundant for C++.
-ifeq (6.3.0,$(gcc_version))
- # The default '-fno-rounding-math' means something like
- # #pragma STDC FENV ACCESS OFF
- # which causes harm while bringing no countervailing benefit--see:
- # http://lists.nongnu.org/archive/html/lmi/2017-08/msg00045.html
- tutelary_flag += -frounding-math
- # This file contains hexadecimal floating constants. There is no
- # specific compiler option to allow them.
- value_cast_test.o: tutelary_flag += -std=gnu++11
-endif
-
C_WARNINGS = \
$(gcc_c_warnings) \
$(gcc_common_extra_warnings) \
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lmi-commits] [lmi] master 15edd3b: Upgrade g++ dialect to C++17,
Greg Chicares <=