aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2017-01-06 12:34:11 +0000
committerJonathan Wakely <redi@gcc.gnu.org>2017-01-06 12:34:11 +0000
commit8b790281d58c106e62033432f6352a1b40d4be2d (patch)
treef2c6ac13802376edd6ea367982c2d647f58c67a5
parent6807f0862833c893bdcdc6838e9303761d93929a (diff)
downloadgcc-8b790281d58c106e62033432f6352a1b40d4be2d.zip
gcc-8b790281d58c106e62033432f6352a1b40d4be2d.tar.gz
gcc-8b790281d58c106e62033432f6352a1b40d4be2d.tar.bz2
Don't redefine _GLIBCXX_ASSERTIONS if already defined
* include/bits/c++config (_GLIBCXX_ASSERTIONS): Avoid redefinition. From-SVN: r244151
-rw-r--r--libstdc++-v3/ChangeLog2
-rw-r--r--libstdc++-v3/include/bits/c++config2
2 files changed, 3 insertions, 1 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index bf4f415..44830a6 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,5 +1,7 @@
2017-01-06 Jonathan Wakely <jwakely@redhat.com>
+ * include/bits/c++config (_GLIBCXX_ASSERTIONS): Avoid redefinition.
+
PR libstdc++/78991
* include/bits/predefined_ops.h (_Iter_comp_iter, _Iter_comp_val)
(_Val_comp_iter, _Iter_equals_val, _Iter_pred, _Iter_comp_to_val)
diff --git a/libstdc++-v3/include/bits/c++config b/libstdc++-v3/include/bits/c++config
index b2eea3c..0cc1865 100644
--- a/libstdc++-v3/include/bits/c++config
+++ b/libstdc++-v3/include/bits/c++config
@@ -423,7 +423,7 @@ namespace std
#endif
// Debug Mode implies checking assertions.
-#ifdef _GLIBCXX_DEBUG
+#if defined(_GLIBCXX_DEBUG) && !defined(_GLIBCXX_ASSERTIONS)
# define _GLIBCXX_ASSERTIONS 1
#endif