]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Guard use of sized deallocation [PR114940]
authorJonathan Wakely <jwakely@redhat.com>
Wed, 22 May 2024 09:32:43 +0000 (10:32 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Wed, 22 May 2024 22:10:05 +0000 (23:10 +0100)
commitb2fdd508d7e63158e9d2a6dd04f901d02900def3
treeae2a7a763beb0309d9c07930a555ad2b3d4e5014
parent3c98d06a9016a0fa3a806879bd168f13b8a606f8
libstdc++: Guard use of sized deallocation [PR114940]

Clang does not enable -fsized-deallocation by default, which means it
can't compile our <stacktrace> and <generator> headers.

Make the __cpp_lib_generator macro depend on the compiler-defined
__cpp_sized_deallocation macro, and change <stacktrace> to use unsized
deallocation when __cpp_sized_deallocation isn't defined.

libstdc++-v3/ChangeLog:

PR libstdc++/114940
* include/bits/version.def (generator): Depend on
__cpp_sized_deallocation.
* include/bits/version.h: Regenerate.
* include/std/stacktrace (_GLIBCXX_SIZED_DELETE): New macro.
(basic_stacktrace::_Impl::_M_deallocate): Use it.
libstdc++-v3/include/bits/version.def
libstdc++-v3/include/bits/version.h
libstdc++-v3/include/std/stacktrace