[PATCH] libstdc++/71856 Define _GLIBCXX_PARALLEL_ASSERTIONS

Jonathan Wakely jwakely@redhat.com
Tue Jul 19 22:16:00 GMT 2016


On 13/07/16 18:26 +0100, Jonathan Wakely wrote:
>This fixes a conflict between how Parallel Mode has always used the
>_GLIBCXX_ASSERTIONS macro and the new meaning we gave it for GCC 6
>(enabling the lightweight debug checks).
>
>It doesn't make sense for Parallel Mode to own that macro, and it
>might be useful to enable Parallel Mode assertions without the other
>checks, so I've changed all the Parallel Mode headers to check
>_GLIBCXX_PARALLEL_ASSERTIONS instead. If that's not defined then it
>defaults to the value of _GLIBCXX_ASSERTIONS, to preserve the old
>behaviour.
>
>	PR libstdc++/71856
>	* include/bits/c++config (_GLIBCXX_ASSERTIONS): Define to 1 not empty.
>	* include/parallel/compiletime_settings.h (_GLIBCXX_ASSERTIONS):
>	Rename to _GLIBCXX_PARALLEL_ASSERTIONS and make default value depend
>	on _GLIBCXX_ASSERTIONS.
>	* include/parallel/balanced_quicksort.h: Rename _GLIBCXX_ASSERTIONS.
>	Include <unistd.h> for sleep.
>	* include/parallel/losertree.h: Rename _GLIBCXX_ASSERTIONS.
>	* include/parallel/merge.h: Likewise.
>	* include/parallel/multiway_merge.h: Likewise.
>	* include/parallel/partition.h: Likewise.
>	* include/parallel/queue.h: Likewise.
>	* include/parallel/sort.h: Likewise.
>	* testsuite/25_algorithms/headers/algorithm/
>	parallel_algorithm_assert.cc: New.

Here is a smaller patch for the gcc-6-branch, which doesn't rename the
macro, but just makes it possible to include <parallel/*> with
_GLIBCXX_DEBUG defined.

Tested x86_64-linux, committed to gcc-5-branch.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt
Type: text/x-patch
Size: 2038 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20160719/382bbf7a/attachment.bin>


More information about the Libstdc++ mailing list