]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Fix memory_resource.cc bootstrap failure for non-gthreads targets
authorJonathan Wakely <jwakely@redhat.com>
Wed, 9 Jul 2025 09:14:23 +0000 (10:14 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 9 Jul 2025 09:37:42 +0000 (10:37 +0100)
commit7a878ba615c2c51ea9cf89142033c5e1ad71795e
tree7b285a018f05a75a7b412d29361cd2da46695e45
parentc6ca6e57004653b787d2d6243fe5ee00cda8aad0
libstdc++: Fix memory_resource.cc bootstrap failure for non-gthreads targets

The new choose_block_size function added in r16-2112-gac2fb60a67d6d1 was
defined inside an #ifdef _GLIBCXX_HAS_GTHREADS group, which means that
it's not available for single-threaded targets, and so can't be used by
unsynchronized_pool_resource. Move it before that preprocessor group so
it's always defined.

libstdc++-v3/ChangeLog:

* src/c++17/memory_resource.cc: Adjust indentation of unnamed
namespaces.
(pool_sizes): Add comment.
(choose_block_size): Move outside preprocessor group for
gthreads targets.
* testsuite/20_util/synchronized_pool_resource/118681.cc:
Require gthreads.
libstdc++-v3/src/c++17/memory_resource.cc
libstdc++-v3/testsuite/20_util/synchronized_pool_resource/118681.cc