From: Tomasz Kamiński Date: Mon, 8 Sep 2025 09:08:09 +0000 (+0200) Subject: libstdc++: Document C++20 atomic_ref implementation-defined behavior. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=88d4738ddc9ca320ea0c1c0e31ff3ca8757ee05b;p=thirdparty%2Fgcc.git libstdc++: Document C++20 atomic_ref implementation-defined behavior. Also introduce Implementation Specific Behavior section for C++20. libstdc++-v3/ChangeLog: * doc/html/index.html: Regenerated. * doc/html/manual/index.html: Regenerated. * doc/html/manual/intro.html: Regenerated. * doc/html/manual/status.html: Regenatered. * doc/xml/manual/status_cxx2020.xml: Add iso.2020.specific section with atomic_ref documentation. Reviewed-by: Jonathan Wakely Signed-off-by: Tomasz Kamiński --- diff --git a/libstdc++-v3/doc/html/index.html b/libstdc++-v3/doc/html/index.html index dd31cff3181..01d7bb787dc 100644 --- a/libstdc++-v3/doc/html/index.html +++ b/libstdc++-v3/doc/html/index.html @@ -23,7 +23,7 @@


Table of Contents

The GNU C++ Library Manual
I. Introduction -
1. Status
Implementation Status
C++ 1998/2003
Implementation Status
Implementation Specific Behavior
C++ 2011
Implementation Specific Behavior
C++ 2014
Implementation Specific Behavior
Filesystem TS
C++ 2017
Implementation Specific Behavior
Parallelism 2 TS
C++ 2020
C++ 2023
C++ TR1
Implementation Specific Behavior
C++ TR 24733
C++ IS 29124
Implementation Specific Behavior
License
The Code: GPL
The Documentation: GPL, FDL
Bugs
Implementation Bugs
Standard Bugs
2. Setup
Prerequisites
Configure
Make
3. Using
Command Options
Headers
Header Files
Mixing Headers
The C Headers and namespace std
Precompiled Headers
Macros
Dual ABI
Troubleshooting
Namespaces
Available Namespaces
namespace std
Using Namespace Composition
Linking
Almost Nothing
Finding Dynamic or Shared Libraries
Experimental Library Extensions
Concurrency
Prerequisites
Thread Safety
Atomics
IO
Structure
Defaults
Future
Alternatives
Containers
Exceptions
Exception Safety
Exception Neutrality
Memory allocation
Doing without
Compatibility
With C
With POSIX thread cancellation
Debugging Support
Using g++
Debug Mode
Tracking uncaught exceptions
Memory Leak Hunting
Non-memory leaks in Pool and MT allocators
Data Race Hunting
Using gdb
Debug Versions of Library Binary Files
Compile Time Checking
II. +
1. Status
Implementation Status
C++ 1998/2003
Implementation Status
Implementation Specific Behavior
C++ 2011
Implementation Specific Behavior
C++ 2014
Implementation Specific Behavior
Filesystem TS
C++ 2017
Implementation Specific Behavior
Parallelism 2 TS
C++ 2020
Implementation Specific Behavior
C++ 2023
C++ TR1
Implementation Specific Behavior
C++ TR 24733
C++ IS 29124
Implementation Specific Behavior
License
The Code: GPL
The Documentation: GPL, FDL
Bugs
Implementation Bugs
Standard Bugs
2. Setup
Prerequisites
Configure
Make
3. Using
Command Options
Headers
Header Files
Mixing Headers
The C Headers and namespace std
Precompiled Headers
Macros
Dual ABI
Troubleshooting
Namespaces
Available Namespaces
namespace std
Using Namespace Composition
Linking
Almost Nothing
Finding Dynamic or Shared Libraries
Experimental Library Extensions
Concurrency
Prerequisites
Thread Safety
Atomics
IO
Structure
Defaults
Future
Alternatives
Containers
Exceptions
Exception Safety
Exception Neutrality
Memory allocation
Doing without
Compatibility
With C
With POSIX thread cancellation
Debugging Support
Using g++
Debug Mode
Tracking uncaught exceptions
Memory Leak Hunting
Non-memory leaks in Pool and MT allocators
Data Race Hunting
Using gdb
Debug Versions of Library Binary Files
Compile Time Checking
II. Standard Contents
4. Support diff --git a/libstdc++-v3/doc/html/manual/index.html b/libstdc++-v3/doc/html/manual/index.html index 5f910927672..816a87a291c 100644 --- a/libstdc++-v3/doc/html/manual/index.html +++ b/libstdc++-v3/doc/html/manual/index.html @@ -4,7 +4,7 @@


Table of Contents

I. Introduction -
1. Status
Implementation Status
C++ 1998/2003
Implementation Status
Implementation Specific Behavior
C++ 2011
Implementation Specific Behavior
C++ 2014
Implementation Specific Behavior
Filesystem TS
C++ 2017
Implementation Specific Behavior
Parallelism 2 TS
C++ 2020
C++ 2023
C++ TR1
Implementation Specific Behavior
C++ TR 24733
C++ IS 29124
Implementation Specific Behavior
License
The Code: GPL
The Documentation: GPL, FDL
Bugs
Implementation Bugs
Standard Bugs
2. Setup
Prerequisites
Configure
Make
3. Using
Command Options
Headers
Header Files
Mixing Headers
The C Headers and namespace std
Precompiled Headers
Macros
Dual ABI
Troubleshooting
Namespaces
Available Namespaces
namespace std
Using Namespace Composition
Linking
Almost Nothing
Finding Dynamic or Shared Libraries
Experimental Library Extensions
Concurrency
Prerequisites
Thread Safety
Atomics
IO
Structure
Defaults
Future
Alternatives
Containers
Exceptions
Exception Safety
Exception Neutrality
Memory allocation
Doing without
Compatibility
With C
With POSIX thread cancellation
Debugging Support
Using g++
Debug Mode
Tracking uncaught exceptions
Memory Leak Hunting
Non-memory leaks in Pool and MT allocators
Data Race Hunting
Using gdb
Debug Versions of Library Binary Files
Compile Time Checking
II. +
1. Status
Implementation Status
C++ 1998/2003
Implementation Status
Implementation Specific Behavior
C++ 2011
Implementation Specific Behavior
C++ 2014
Implementation Specific Behavior
Filesystem TS
C++ 2017
Implementation Specific Behavior
Parallelism 2 TS
C++ 2020
Implementation Specific Behavior
C++ 2023
C++ TR1
Implementation Specific Behavior
C++ TR 24733
C++ IS 29124
Implementation Specific Behavior
License
The Code: GPL
The Documentation: GPL, FDL
Bugs
Implementation Bugs
Standard Bugs
2. Setup
Prerequisites
Configure
Make
3. Using
Command Options
Headers
Header Files
Mixing Headers
The C Headers and namespace std
Precompiled Headers
Macros
Dual ABI
Troubleshooting
Namespaces
Available Namespaces
namespace std
Using Namespace Composition
Linking
Almost Nothing
Finding Dynamic or Shared Libraries
Experimental Library Extensions
Concurrency
Prerequisites
Thread Safety
Atomics
IO
Structure
Defaults
Future
Alternatives
Containers
Exceptions
Exception Safety
Exception Neutrality
Memory allocation
Doing without
Compatibility
With C
With POSIX thread cancellation
Debugging Support
Using g++
Debug Mode
Tracking uncaught exceptions
Memory Leak Hunting
Non-memory leaks in Pool and MT allocators
Data Race Hunting
Using gdb
Debug Versions of Library Binary Files
Compile Time Checking
II. Standard Contents
4. Support diff --git a/libstdc++-v3/doc/html/manual/intro.html b/libstdc++-v3/doc/html/manual/intro.html index 5bb4814d502..e6e1c423781 100644 --- a/libstdc++-v3/doc/html/manual/intro.html +++ b/libstdc++-v3/doc/html/manual/intro.html @@ -5,4 +5,4 @@ Prev The GNU C++ Library Manual Next
\ No newline at end of file + \ No newline at end of file diff --git a/libstdc++-v3/doc/html/manual/status.html b/libstdc++-v3/doc/html/manual/status.html index 564679bc6cf..208025edaa3 100644 --- a/libstdc++-v3/doc/html/manual/status.html +++ b/libstdc++-v3/doc/html/manual/status.html @@ -2,7 +2,7 @@ Chapter 1. Status

Chapter 1. Status

Implementation Status

C++ 1998/2003

Implementation Status

+ Next


Chapter 1. Status

Implementation Status

C++ 1998/2003

Implementation Status

This status table is based on the table of contents of ISO/IEC 14882:2003.

This section describes the C++ support in @@ -1759,7 +1759,44 @@ Note 1: This feature is supported in older releases but the Note 2: The C++20 calendar types are supported since 11.1, time zones and UTC are supported since 13.1, and chrono::parse is supported since 14.1. -

C++ 2023

+

Implementation Specific Behavior

For behaviour which is also specified by previous standards, + see C++ 1998/2003 Implementation + Specific Behavior, C++ + 2011 Implementation Specific Behavior, and + C++ 2017 Implementation Specific + Behavior. This section only documents behaviour which is new in + the 2020 standard. +

+ 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. +

+ 31.7.1 [atomics.ref.generic.general], + 31.7.3 [atomics.ref.int], + 31.7.4 [atomics.ref.float], + 31.7.5 [atomics.ref.pointer] + The values of is_always_lock_free members depend on the + target and cannot be listed here. +

+ 31.7.1 [atomics.ref.generic.general] + If sizeof(T) is equal to either 1, + 2, 4, 8, or 16, + then the value of required_alignment member is equal to + the maximum of alignof(T) and sizeof(T). + Otherwise required_alignment value is alignof(T). +

+ 31.7.3 [atomics.ref.int] + The value of required_alignment member is equal to the + maximum of alignof(value_type) and + sizeof(value_type). +

+ 31.7.4 [atomics.ref.float], + 31.7.5 [atomics.ref.pointer] + The value of required_alignment member is equal to + alignof(value_type). +

C++ 2023

In this implementation the -std=gnu++23 or -std=c++23 flag must be used to enable language and library diff --git a/libstdc++-v3/doc/xml/manual/status_cxx2020.xml b/libstdc++-v3/doc/xml/manual/status_cxx2020.xml index 0e3e4c3de7f..dca4caac91e 100644 --- a/libstdc++-v3/doc/xml/manual/status_cxx2020.xml +++ b/libstdc++-v3/doc/xml/manual/status_cxx2020.xml @@ -1453,4 +1453,57 @@ time zones and UTC are supported since 13.1, and chrono::parse is supported since 14.1. +

Implementation Specific Behavior + + For behaviour which is also specified by previous standards, + see C++ 1998/2003 Implementation + Specific Behavior, C++ + 2011 Implementation Specific Behavior, and + C++ 2017 Implementation Specific + Behavior. This section only documents behaviour which is new in + the 2020 standard. + + + + 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. + + + + 31.7.1 [atomics.ref.generic.general], + 31.7.3 [atomics.ref.int], + 31.7.4 [atomics.ref.float], + 31.7.5 [atomics.ref.pointer] + The values of is_always_lock_free members depend on the + target and cannot be listed here. + + + + 31.7.1 [atomics.ref.generic.general] + If sizeof(T) is equal to either 1, + 2, 4, 8, or 16, + then the value of required_alignment member is equal to + the maximum of alignof(T) and sizeof(T). + Otherwise required_alignment value is alignof(T). + + + + 31.7.3 [atomics.ref.int] + The value of required_alignment member is equal to the + maximum of alignof(value_type) and + sizeof(value_type). + + + + 31.7.4 [atomics.ref.float], + 31.7.5 [atomics.ref.pointer] + The value of required_alignment member is equal to + alignof(value_type). + + +
+