]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Add noexcept to __replacement_assert [PR101429]
authorJonathan Wakely <jwakely@redhat.com>
Wed, 14 Jul 2021 11:25:11 +0000 (12:25 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Thu, 15 Jul 2021 15:25:42 +0000 (16:25 +0100)
commit1f7182d68c24985dace2a94422c671ff987c262c
tree906ff18cd1947bc0f2d43d269a8257d73f4e460c
parentad5f8ac1d2f2dc92d43663243b52f9e9eb3cf7c0
libstdc++: Add noexcept to __replacement_assert [PR101429]

This results in slightly smaller code when assertions are enabled when
either using Clang (because it adds code to call std::terminate when
potentially-throwing functions are called in a noexcept function) or a
freestanding or non-verbose build (because it doesn't use printf).

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
libstdc++-v3/ChangeLog:

PR libstdc++/101429
* include/bits/c++config (__replacement_assert): Add noexcept.
[!_GLIBCXX_VERBOSE] (__glibcxx_assert_impl): Use __builtin_trap
instead of __replacement_assert.
libstdc++-v3/include/bits/c++config