[libcxx-commits] [libcxx] [libc++] Apply `[[gnu::pure]]` to `get_new_handler` (PR #220847)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Sep 3 05:24:57 PDT 2026
https://github.com/philnik777 approved this pull request.
Sorry for flip-flopping here, but I think this is actually incorrect. https://eel.is/c++draft/handler.functions#4 says that `get_new_handler` and `set_new_handler` synchronize, so you could in theory write a spin loop using them to synchronize between threads, which `[[gnu::pure]]` would break.
LGTM with `[[nodiscard]]`.
https://github.com/llvm/llvm-project/pull/220847
More information about the libcxx-commits
mailing list