From: Tomasz Kamiński Date: Mon, 8 Sep 2025 11:33:57 +0000 (+0200) Subject: libstdc++: Document remaining C++20 implementation-defined behavior. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ec29759bab8442643d6f381af74edf0f3bcfb95;p=thirdparty%2Fgcc.git libstdc++: Document remaining C++20 implementation-defined behavior. I have double checked that implementation-defined behavior in the [compliance] (whether the implementation is freestanding) and [stringbuf.const] (initialization of sequence pointers) are indeed null, and there are no corresponding entires in earlier standards. libstdc++-v3/ChangeLog: * doc/html/manual/status.html: Regenerate. * doc/xml/manual/status_cxx2020.xml: Add more entires. Reviewed-by: Jonathan Wakely Signed-off-by: Tomasz Kamiński --- diff --git a/libstdc++-v3/doc/html/manual/status.html b/libstdc++-v3/doc/html/manual/status.html index 208025edaa3..164faebbf37 100644 --- a/libstdc++-v3/doc/html/manual/status.html +++ b/libstdc++-v3/doc/html/manual/status.html @@ -1766,12 +1766,27 @@ and chrono::parse is supported since 14.1. C++ 2017 Implementation Specific Behavior. This section only documents behaviour which is new in the 2020 standard. +

+ 16.4.2.4 [compliance] The implementation is + freestanding if the -ffreestanding compiler flag is used, + and hosted otherwise.

16.4.2.4 [compliance] The support for always lock-free integral atomic types and presence of atomic_signed_lock_free and atomic_unsigned_lock_free type aliases depends on the target. +

+ 27.5.11 [time.duration.io] + The "μs" ("\u00b5\u0073") is used + for std::micro Period::type if the macro + _GLIBCXX_USE_ALT_MICROSECONDS_SUFFIX is defined to a value + other than zero before inclusion of the chrono header, + "us" is used otherwise. +

+ 29.8.2.2 [stringbuf.cons] Sequence pointers are + initialized to null pointers by the + basic_stringbuf(ios_base::openmode) constructor.

31.7.1 [atomics.ref.generic.general], 31.7.3 [atomics.ref.int], @@ -1796,6 +1811,12 @@ and chrono::parse is supported since 14.1. 31.7.5 [atomics.ref.pointer] The value of required_alignment member is equal to alignof(value_type). +

+ 32.7.3 [thread.sema.cnt] The value of default + argument for the least_max_value parameter depends on the + target operating system and platform, however the value of + counting_semaphore<>::max() is greater than or equal + to numeric_limits<int>::max().

C++ 2023

In this implementation the -std=gnu++23 or -std=c++23 flag must be used to enable language diff --git a/libstdc++-v3/doc/xml/manual/status_cxx2020.xml b/libstdc++-v3/doc/xml/manual/status_cxx2020.xml index dca4caac91e..9cee44fd438 100644 --- a/libstdc++-v3/doc/xml/manual/status_cxx2020.xml +++ b/libstdc++-v3/doc/xml/manual/status_cxx2020.xml @@ -1464,6 +1464,12 @@ and chrono::parse is supported since 14.1. the 2020 standard. + + 16.4.2.4 [compliance] The implementation is + freestanding if the -ffreestanding compiler flag is used, + and hosted otherwise. + + 16.4.2.4 [compliance] The support for always lock-free integral atomic types and presence of @@ -1472,6 +1478,21 @@ and chrono::parse is supported since 14.1. target. + + 27.5.11 [time.duration.io] + The "μs" ("\u00b5\u0073") is used + for std::micro Period::type if the macro + _GLIBCXX_USE_ALT_MICROSECONDS_SUFFIX is defined to a value + other than zero before inclusion of the chrono header, + "us" is used otherwise. + + + + 29.8.2.2 [stringbuf.cons] Sequence pointers are + initialized to null pointers by the + basic_stringbuf(ios_base::openmode) constructor. + + 31.7.1 [atomics.ref.generic.general], 31.7.3 [atomics.ref.int], @@ -1504,6 +1525,14 @@ and chrono::parse is supported since 14.1. alignof(value_type). + + 32.7.3 [thread.sema.cnt] The value of default + argument for the least_max_value parameter depends on the + target operating system and platform, however the value of + counting_semaphore<>::max() is greater than or equal + to numeric_limits<int>::max(). + +