From mboxrd@z Thu Jan 1 00:00:00 1970
Return-Path:
Received: by sourceware.org (Postfix, from userid 2181)
id E6C6A3858D39; Thu, 29 Sep 2022 14:17:33 +0000 (GMT)
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E6C6A3858D39
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org;
s=default; t=1664461053;
bh=ckv4Pq4Ud0XfTw2fXnmu+/0ECJ/2n5l4PmrH06HIPHU=;
h=From:To:Subject:Date:From;
b=wTdB31189OfBRjv5zEsjLV4EC6rxIDqVUs1WyT4Sf6CElM6pAG/xQxhDtgJQkW24Q
gjNNRqJeIJaDSigc1t4x0XnxnFqvmJEkcwcY4e7dt+NfN4pVpFHaU9WkOWfkQvobln
d1Gc6lin/R/G3V8eOjd3Z+Oeq+i0Pf1l57n8TNpA=
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset="utf-8"
From: Jonathan Wakely
To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org
Subject: [gcc r12-8794] libstdc++: Disable volatile-qualified std::bind for
C++20
X-Act-Checkin: gcc
X-Git-Author: Jonathan Wakely
X-Git-Refname: refs/heads/releases/gcc-12
X-Git-Oldrev: afea1ae84f0c3e64137289c44c756195babe1845
X-Git-Newrev: 85adc2ec2b0736d07c0df35ad9a450f97ff59a7c
Message-Id: <20220929141733.E6C6A3858D39@sourceware.org>
Date: Thu, 29 Sep 2022 14:17:33 +0000 (GMT)
List-Id:
https://gcc.gnu.org/g:85adc2ec2b0736d07c0df35ad9a450f97ff59a7c
commit r12-8794-g85adc2ec2b0736d07c0df35ad9a450f97ff59a7c
Author: Jonathan Wakely
Date: Wed Sep 28 12:39:41 2022 +0100
libstdc++: Disable volatile-qualified std::bind for C++20
LWG 2487 added a precondition to std::bind for C++17, making
volatile-qualified uses undefined. We still support it, but with a
deprecated warning.
P1065R2 made it explicitly ill-formed for C++20, so we should no longer
accept it as deprecated. This implements that change.
libstdc++-v3/ChangeLog:
* doc/xml/manual/evolution.xml: Document std::bind API
changes.
* doc/xml/manual/intro.xml: Document LWG 2487 status.
* doc/xml/manual/using.xml: Clarify default value of
_GLIBCXX_USE_DEPRECATED.
* doc/html/*: Regenerate.
* include/std/functional (_Bind::operator()(Args&&...) volatile)
(_Bind::operator()(Args&&...) const volatile)
(_Bind_result::operator()(Args&&...) volatile)
(_Bind_result::operator()(Args&&...) const volatile): Replace
with deleted overload for C++20 and later.
* testsuite/20_util/bind/cv_quals.cc: Check for deprecated
warnings in C++17.
* testsuite/20_util/bind/cv_quals_2.cc: Likewise, and check for
ill-formed in C++20.
(cherry picked from commit d01f112de4a54db6d2abef836e6dff3a08167389)
Diff:
---
libstdc++-v3/doc/html/index.html | 2 +-
libstdc++-v3/doc/html/manual/api.html | 5 ++++
libstdc++-v3/doc/html/manual/appendix.html | 2 +-
libstdc++-v3/doc/html/manual/appendix_porting.html | 2 +-
libstdc++-v3/doc/html/manual/bugs.html | 6 ++++
libstdc++-v3/doc/html/manual/index.html | 2 +-
libstdc++-v3/doc/html/manual/using_macros.html | 5 ++--
libstdc++-v3/doc/xml/manual/evolution.xml | 13 +++++++++
libstdc++-v3/doc/xml/manual/intro.xml | 9 ++++++
libstdc++-v3/doc/xml/manual/using.xml | 5 ++--
libstdc++-v3/include/std/functional | 32 ++++++++++++++++------
libstdc++-v3/testsuite/20_util/bind/cv_quals.cc | 25 +++++++++--------
libstdc++-v3/testsuite/20_util/bind/cv_quals_2.cc | 12 ++++----
13 files changed, 87 insertions(+), 33 deletions(-)
diff --git a/libstdc++-v3/doc/html/index.html b/libstdc++-v3/doc/html/index.html
index 5cc9226f4a1..1e0cecbcc4f 100644
--- a/libstdc++-v3/doc/html/index.html
+++ b/libstdc++-v3/doc/html/index.html
@@ -142,7 +142,7 @@
Existing tests
C++11 Requirements Test Sequence Descriptions
-ABI Policy and Guidelines- The C++ Interface
- Versioning
- Goals
- History
- Prerequisites
- Configuring
- Checking Active
- Allowed Changes
- Prohibited Changes
- Implementation
- Testing
- Single ABI Testing
- Multiple ABI Testing
- Outstanding Issues
API Evolution and Deprecation History3.0
3.1
3.2
3.3
3.4
4.0
4.1
4.2
4.3
4.4
4.5
4.6
4.7
4.8
4.9
5
5.3
6
7
7.2
7.3
8
9
10
11
12
Backwards Compatibility- First
- Second
- Third
- Pre-ISO headers removed
- Extension headers hash_map, hash_set moved to ext or backwards
- No
ios::nocreate/ios::noreplace
.
+
ABI Policy and Guidelines- The C++ Interface
- Versioning
- Goals
- History
- Prerequisites
- Configuring
- Checking Active
- Allowed Changes
- Prohibited Changes
- Implementation
- Testing
- Single ABI Testing
- Multiple ABI Testing
- Outstanding Issues
API Evolution and Deprecation History3.0
3.1
3.2
3.3
3.4
4.0
4.1
4.2
4.3
4.4
4.5
4.6
4.7
4.8
4.9
5
5.3
6
7
7.2
7.3
8
9
10
11
12
12.3
Backwards Compatibility- First
- Second
- Third
- Pre-ISO headers removed
- Extension headers hash_map, hash_set moved to ext or backwards
- No
ios::nocreate/ios::noreplace
.
-
No
stream::attach(int fd)
-
diff --git a/libstdc++-v3/doc/html/manual/api.html b/libstdc++-v3/doc/html/manual/api.html
index bbda6f5acf3..604380e0136 100644
--- a/libstdc++-v3/doc/html/manual/api.html
+++ b/libstdc++-v3/doc/html/manual/api.html
@@ -316,6 +316,8 @@ now defaults to zero.
has_trivial_default_constructor
,
has_trivial_copy_constructor
and
has_trivial_copy_assign
removed.
+
+Calling a std::bind
result as volatile was deprecated for C++17.
Profile Mode was deprecated.
Library Fundamentals TS header
<experimental/source_location>
@@ -468,4 +470,7 @@ they both derive from std::__new_allocator
instea
noexcept(false)
to allow thread cancellation exceptions to
be thrown from pthread_cond_wait
without aborting
the process.
+
+Calling a std::bind
result as volatile is ill-formed for C++20
+and later.