]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libstdc++-v3/include/parallel/base.h
libstdc++: Add compile-time checks to__glibcxx_assert [PR 71960]
[thirdparty/gcc.git] / libstdc++-v3 / include / parallel / base.h
index 0d1c2644e8fb7a75a34b66d97d4636bb31dfdd33..973a2dcd514ee08a85f45db1d79a88b821600d95 100644 (file)
@@ -420,9 +420,10 @@ namespace __gnu_parallel
     }
 
 #if _GLIBCXX_PARALLEL_ASSERTIONS && defined(__glibcxx_assert_impl)
-#define _GLIBCXX_PARALLEL_ASSERT(_Condition) __glibcxx_assert_impl(_Condition)
+# define _GLIBCXX_PARALLEL_ASSERT(_Condition) \
+  do { __glibcxx_assert_impl(_Condition); } while (false)
 #else
-#define _GLIBCXX_PARALLEL_ASSERT(_Condition)
+# define _GLIBCXX_PARALLEL_ASSERT(_Condition) do { } while (false)
 #endif
 
 } //namespace __gnu_parallel