Don't redefine _GLIBCXX_ASSERTIONS if already defined
authorJonathan Wakely <jwakely@redhat.com>
Fri, 6 Jan 2017 12:34:11 +0000 (12:34 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Fri, 6 Jan 2017 12:34:11 +0000 (12:34 +0000)
* include/bits/c++config (_GLIBCXX_ASSERTIONS): Avoid redefinition.

From-SVN: r244151

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/c++config

index bf4f415c15db8194a3d1e0c813cb0b60c926342d..44830a6c97204653a1418eb27e20727c0858a72f 100644 (file)
@@ -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)
index b2eea3ca36a98118056452fbab5718beddeb3699..0cc1865294c2c46c01b921a5f1d5c5b9730685eb 100644 (file)
@@ -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