[PATCH] Replace direct PSTL uses of assert() with a macro

Thomas Rodgers trodgers@redhat.com
Thu Apr 11 20:50:00 GMT 2019


<cassert> removed (patch version applied attached).

Tested x86_64-linux, committed to trunk.

Jonathan Wakely writes:

> On 10/04/19 23:59 +0100, Jonathan Wakely wrote:
>>On 10/04/19 15:57 -0700, Thomas Rodgers wrote:
>>>Ok, lets try this again.
>>>
>>>>On 09/04/19 15:23 -0700, Thomas Rodgers wrote:
>>>>>This also replaces calls to __TBB_ASSERT so that there are two macro
>>>>>definitions provided by c++config -
>>>>>	    __PSTL_ASSERT(_Condition)
>>>>>	    __PSTL_ASSERT_MSG(_Condition, _Message)
>>>>>
>>>>>	    * include/bits/c++config:
>>>>>	    Add definition for __PSTL_ASSERT.
>>>>>	    Add definition for __PSTL_ASSERT_MSG.
>>>>>	    * include/pstl/algorithm_impl.h: Replace use of assert().
>>>>>	    * include/pstl/numeric_impl.h: Replace use of assert().
>>>>>	    * include/pstl/parallel_backend_tbb.h:
>>>>>	    Replace use of assert().
>>>>>	    Replace use of __TBB_ASSERT().
>>>>>
>>>>>	    * include/pstl/parallel_backend_utils.h: Replace use of assert().
>>>
>>>Jonathan Wakely writes:
>>>>... you fix now ...
>>
>>Looks good, OK for trunk, thanks.
>
> Looks like parallel_backend_tbb.h still includes <cassert> after this
> patch. Assuming tests still pass with that removed, that tweak to the
> patch is pre-approved.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 20190410-2-Replace-direct-PSTL-uses-of-assert-with-a-macro.patch
Type: text/x-patch
Size: 8596 bytes
Desc: as committed
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20190411/b340cdbc/attachment.bin>


More information about the Libstdc++ mailing list