From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2EB393857C7E; Wed, 10 Feb 2021 19:44:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2EB393857C7E From: "bspencer at blackberry dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/99058] Consider adding a note about std::optional ABI break to the C++17 status table Date: Wed, 10 Feb 2021 19:44:50 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: unknown X-Bugzilla-Keywords: documentation X-Bugzilla-Severity: normal X-Bugzilla-Who: bspencer at blackberry dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Feb 2021 19:44:50 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99058 --- Comment #3 from Brad Spencer --- (In reply to Jonathan Wakely from comment #1) > C++17 support isn't stable until GCC 9 so there is no guarantee of > compatibility between 7 and 8 or 8 and 9. That applies to the entire libr= ary > (and language features) not just std::optional. Ok. What's the right way for me to learn what version of GCC has stable support for a C++ version? For example, where would I look to know that C+= +17 support isn't stable until GCC 9? I can't seem to find that information on= the status page, but maybe I am looking in the wrong place. (In reply to Jonathan Wakely from comment #2) > (In reply to Brad Spencer from comment #0) > > Perhaps I was misusing this table, but I interpreted "supported since 7= .1" > > to mean that if I compile against 7.1 headers, my code will remain ABI > > compatible against future versions of the library _and_ other code comp= iled > > against future versions of the headers. >=20 > Absolutely not. Sorry. I was imprecise in my wording. I am not looking for or expecting a= ny guarantees. I am under the (possibly mistaken) impression that the libstdc++ ABI (in a given configuration) has been stable for a very long time, and that general= ly integrators (such as Debian or Ubuntu, for example) provide versions of libstdc++ that are ABI-compatible with code compiled against previous versi= ons.=20 As per https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html this is reflected in the long-standing .so major version of 6. I know there are ma= ny caveats here, especially around the early introduction of pre-standardized features, etc. Is it correct to think that the _intention_ is that it is possible to confi= gure the library to remain ABI compatible into the future until a conscious deci= sion is made to introduce an ABI break? Or, if I ever run code compiled with GCC N against the library from GCC N+1= , am I always at risk, with not even best efforts to lean on? I'm not asking you to do more. I just want to get a good understanding of = the circumstances of ABI stability.=