]> git.ipfire.org Git - thirdparty/gcc.git/commit - libstdc++-v3/include/bits/version.h
libstdc++: Do not declare strtok for C++26 freestanding (P2937R0)
authorJonathan Wakely <jwakely@redhat.com>
Tue, 21 Nov 2023 11:49:22 +0000 (11:49 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Tue, 21 Nov 2023 15:58:21 +0000 (15:58 +0000)
commit7adb7c6ea4cf3d7ea7867615a5a094c751715b14
tree0f931223b68a69294ca8bb6ff248c94cd7fba682
parent43626143c9d4411353709bab09631d267bb4dadd
libstdc++: Do not declare strtok for C++26 freestanding (P2937R0)

This was recently approved for C++26.

We should define the __cpp_lib_freestanding_cstring macro in <string.h>
as well as <cstring>, but we do not currently install our own <string.h>
for most targets.

libstdc++-v3/ChangeLog:

* include/bits/version.def (freestanding_cstring): Add.
* include/bits/version.h: Regenerate.
* include/c_compatibility/string.h (strtok): Do not declare for
C++26 freestanding.
* include/c_global/cstring (strtok): Likewise.
* testsuite/21_strings/headers/cstring/version.cc: New test.
libstdc++-v3/include/bits/version.def
libstdc++-v3/include/bits/version.h
libstdc++-v3/include/c_compatibility/string.h
libstdc++-v3/include/c_global/cstring
libstdc++-v3/testsuite/21_strings/headers/cstring/version.cc [new file with mode: 0644]