public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-5643] libstdc++: Ensure C++20 std::stringstream definitions use correct ABI
@ 2021-11-30 23:10 Jonathan Wakely
  0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2021-11-30 23:10 UTC (permalink / raw)
  To: gcc-cvs, libstdc++-cvs

https://gcc.gnu.org/g:56b07badf052fb140c4636f6d77cfc02d1ac357c

commit r12-5643-g56b07badf052fb140c4636f6d77cfc02d1ac357c
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Tue Nov 30 22:04:49 2021 +0000

    libstdc++: Ensure C++20 std::stringstream definitions use correct ABI
    
    The definitions of the new C++20 members of std::stringstream etc are
    missing when --with-default-libstdcxx-abi=gcc4-compatible is used,
    because all the explicit instantiations in src/c++20/sstream-inst.cc are
    skipped.
    
    This ensures the contents of that file are compiled with the new ABI, so
    the same set of symbols are exported regardless of which ABI is active
    by default.
    
    libstdc++-v3/ChangeLog:
    
            * src/c++20/sstream-inst.cc (_GLIBCXX_USE_CXX11_ABI): Define to
            select new ABI.

Diff:
---
 libstdc++-v3/src/c++20/sstream-inst.cc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libstdc++-v3/src/c++20/sstream-inst.cc b/libstdc++-v3/src/c++20/sstream-inst.cc
index b3fbd6ead44..55d1fe5234d 100644
--- a/libstdc++-v3/src/c++20/sstream-inst.cc
+++ b/libstdc++-v3/src/c++20/sstream-inst.cc
@@ -26,7 +26,9 @@
 // ISO C++ 14882:
 //
 
-// Instantiations in this file are only for the new SSO std::string ABI
+// Instantiations in this file are only for the new SSO std::string ABI.
+#define _GLIBCXX_USE_CXX11_ABI 1
+
 #include <sstream>
 
 #if _GLIBCXX_USE_CXX11_ABI


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-11-30 23:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-30 23:10 [gcc r12-5643] libstdc++: Ensure C++20 std::stringstream definitions use correct ABI Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).