From patchwork Fri Sep 20 22:49:07 2024
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Jonathan Wakely
X-Patchwork-Id: 1988073
Return-Path:
X-Original-To: incoming@patchwork.ozlabs.org
Delivered-To: patchwork-incoming@legolas.ozlabs.org
Authentication-Results: legolas.ozlabs.org;
dkim=pass (1024-bit key;
unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256
header.s=mimecast20190719 header.b=BAles3qx;
dkim-atps=neutral
Authentication-Results: legolas.ozlabs.org;
spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org
(client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org;
envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org;
receiver=patchwork.ozlabs.org)
Received: from server2.sourceware.org (server2.sourceware.org
[IPv6:2620:52:3:1:0:246e:9693:128c])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384)
(No client certificate requested)
by legolas.ozlabs.org (Postfix) with ESMTPS id 4X9SKC0j2Lz1y27
for ; Sat, 21 Sep 2024 08:50:37 +1000 (AEST)
Received: from server2.sourceware.org (localhost [IPv6:::1])
by sourceware.org (Postfix) with ESMTP id 15EFB3858CDA
for ; Fri, 20 Sep 2024 22:50:35 +0000 (GMT)
X-Original-To: gcc-patches@gcc.gnu.org
Delivered-To: gcc-patches@gcc.gnu.org
Received: from us-smtp-delivery-124.mimecast.com
(us-smtp-delivery-124.mimecast.com [170.10.133.124])
by sourceware.org (Postfix) with ESMTP id 04D493858CDA
for ; Fri, 20 Sep 2024 22:49:29 +0000 (GMT)
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 04D493858CDA
Authentication-Results: sourceware.org;
dmarc=pass (p=none dis=none) header.from=redhat.com
Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 04D493858CDA
Authentication-Results: server2.sourceware.org;
arc=none smtp.remote-ip=170.10.133.124
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1726872572; cv=none;
b=a+ueUdmsuyrg+tdX36vs4GLPgD8UHNik/J2euv2SAKxNDQuJ93faowHkQ1jB7eCchuq8lK84bny9M3adnrV63mBylrKnL+OhZI7JlQZvatHlvBggGwiPJ3c6TGFtulElUv57rx2L0UZjN9U494rpv+Fu8LAoJwiLXItkDe0Y2f0=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1726872572; c=relaxed/simple;
bh=sLTDfswAQzBEyyOXkKjQouIcEMwSkxtiBu98eVc/NsQ=;
h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version;
b=bHzjVF7ScfzCZAEFkQT7XJD7EBhFUHmKdZh61TK5+5oDUNyITjYOKH6lRdhYIbnBsNAab8+hugIs41un+2T6HbdwIO7Z4nt0Rskm8g4KjTARxZRU1t07167L8FIR9z/JTatZ6BhlE5A4scPNkPzVkuWv9U7y1BIlL8nPBqOzMMY=
ARC-Authentication-Results: i=1; server2.sourceware.org
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
s=mimecast20190719; t=1726872569;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=VKqMIrrKxzFCvsa8k+qGSK79PoWfzR6IhT0DFUIaP68=;
b=BAles3qxb85CnOg10ReC19BXi3J8HHodxFKyPArXqoOfE+qim8EtcvuvZgScsnJgV3+kA/
NrYOd0CdavM3v/whNPacSisFUoN+DYRQvsGmQCoKmWoGVQFHCQTRdDmlaAdDHi3G5i2Tdr
hdgTPghsc7hDuwGPK0TGTs6MZy/vTg4=
Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com
(ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by
relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,
cipher=TLS_AES_256_GCM_SHA384) id us-mta-102-RWP4zEb2Mn-BNu6-RtyCeQ-1; Fri,
20 Sep 2024 18:49:27 -0400
X-MC-Unique: RWP4zEb2Mn-BNu6-RtyCeQ-1
Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (unknown
[10.30.177.12])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest
SHA256)
(No client certificate requested)
by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS
id B5DCA19792F5; Fri, 20 Sep 2024 22:49:26 +0000 (UTC)
Received: from localhost (unknown [10.42.28.136])
by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP
id 1678F19560AA; Fri, 20 Sep 2024 22:49:25 +0000 (UTC)
From: Jonathan Wakely
To: libstdc++@gcc.gnu.org,
gcc-patches@gcc.gnu.org
Subject: [committed] libstdc++: Document missing features for old std:string
ABI [PR116777]
Date: Fri, 20 Sep 2024 23:49:07 +0100
Message-ID: <20240920224924.929747-1-jwakely@redhat.com>
MIME-Version: 1.0
X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12
X-Mimecast-Spam-Score: 0
X-Mimecast-Originator: redhat.com
X-Spam-Status: No, score=-13.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH,
DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0,
RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,
SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
server2.sourceware.org
X-BeenThere: gcc-patches@gcc.gnu.org
X-Mailman-Version: 2.1.30
Precedence: list
List-Id: Gcc-patches mailing list
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org
Pushed to trunk.
-- >8 --
There are several features that are not supported when using the old
std::string ABI. It's possible that PR 81967 will get fixed, but the
missing C++20 features almost certainly won't be. Document this in the
manual.
libstdc++-v3/ChangeLog:
PR libstdc++/116777
* doc/xml/manual/using.xml: Document features that are not
supported for the gcc4-compatible ABI.
* doc/html/manual/using_dual_abi.html: Regenerate.
---
.../doc/html/manual/using_dual_abi.html | 18 ++++++++++++-
libstdc++-v3/doc/xml/manual/using.xml | 26 ++++++++++++++++++-
2 files changed, 42 insertions(+), 2 deletions(-)
diff --git a/libstdc++-v3/doc/html/manual/using_dual_abi.html b/libstdc++-v3/doc/html/manual/using_dual_abi.html
index 916ac575f64..939eedae362 100644
--- a/libstdc++-v3/doc/html/manual/using_dual_abi.html
+++ b/libstdc++-v3/doc/html/manual/using_dual_abi.html
@@ -22,7 +22,7 @@
of the macro is 1
which causes the new ABI to be active,
so to use the old ABI you must explicitly define the macro to
0
before including any library headers.
- (Be aware that some GNU/Linux distributions configure GCC 5 differently so
+ (Be aware that some GNU/Linux distributions configured GCC 5 differently so
that the default value of the macro is 0
and users must
define it to 1
to enable the new ABI.)
Although the changes were made for C++11 conformance, the choice of ABI
@@ -72,6 +72,22 @@
Handlers for std::exception
will always catch
iostreams exceptions, because the old and new type both inherit from
std::exception
.
+
+ Some features are not supported when using the old ABI, including:
+
-
+ Using
std::string::const_iterator
for
+ positional arguments to member functions such as
+ std::string::erase
.
+ -
+ Allocator propagation in
std::string
.
+ -
+ Using
std::string
at compile-time in
+ constexpr
functions.
+ -
+ Class
std::chrono::time_zone
and all related APIs.
+ -
+ The
<syncstream>
header.
+
If you get linker errors about undefined references to symbols
that involve types in the std::__cxx11
namespace or the tag
[abi:cxx11]
then it probably indicates that you are trying to
diff --git a/libstdc++-v3/doc/xml/manual/using.xml b/libstdc++-v3/doc/xml/manual/using.xml
index 4e1c70040b5..89119f6fb2d 100644
--- a/libstdc++-v3/doc/xml/manual/using.xml
+++ b/libstdc++-v3/doc/xml/manual/using.xml
@@ -1368,7 +1368,7 @@ g++ -Winvalid-pch -I. -include stdc++.h -H -g -O2 hello.cc -o test.exe
of the macro is 1 which causes the new ABI to be active,
so to use the old ABI you must explicitly define the macro to
0 before including any library headers.
- (Be aware that some GNU/Linux distributions configure GCC 5 differently so
+ (Be aware that some GNU/Linux distributions configured GCC 5 differently so
that the default value of the macro is 0 and users must
define it to 1 to enable the new ABI.)
@@ -1428,6 +1428,30 @@ g++ -Winvalid-pch -I. -include stdc++.h -H -g -O2 hello.cc -o test.exe
std::exception.
+
+ Some features are not supported when using the old ABI, including:
+
+
+ Using std::string::const_iterator for
+ positional arguments to member functions such as
+ std::string::erase.
+
+
+ Allocator propagation in std::string.
+
+
+ Using std::string at compile-time in
+ constexpr
functions.
+
+
+ Class std::chrono::time_zone and all related APIs.
+
+
+ The header.
+
+
+
+
Troubleshooting
If you get linker errors about undefined references to symbols