[committed] libstdc++: Fix <iosfwd> synopsis test

Message ID 20230703230828.995791-1-jwakely@redhat.com
State Accepted
Headers
Series [committed] libstdc++: Fix <iosfwd> synopsis test |

Checks

Context Check Description
snail/gcc-patch-check success Github commit url

Commit Message

Jonathan Wakely July 3, 2023, 11:08 p.m. UTC
  Tested x86_64-linux. Pushed to trunk.

-- >8 --

The <syncstream> header is only supported for the cxx11 ABI. The
declarations of basic_syncbuf, basic_osyncstream, syncbuf and
osyncstream were already correctly guarded by a check for
_GLIBCXX_USE_CXX11_ABI, but the wsyncbuf and wosyncstream declarations
were not.

libstdc++-v3/ChangeLog:

	* testsuite/27_io/headers/iosfwd/synopsis.cc: Make wsyncbuf and
	wosyncstream depend on _GLIBCXX_USE_CXX11_ABI.
---
 libstdc++-v3/testsuite/27_io/headers/iosfwd/synopsis.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/libstdc++-v3/testsuite/27_io/headers/iosfwd/synopsis.cc b/libstdc++-v3/testsuite/27_io/headers/iosfwd/synopsis.cc
index b6d3fa7a719..12f47ae8133 100644
--- a/libstdc++-v3/testsuite/27_io/headers/iosfwd/synopsis.cc
+++ b/libstdc++-v3/testsuite/27_io/headers/iosfwd/synopsis.cc
@@ -115,7 +115,7 @@  _GLIBCXX_END_NAMESPACE_CXX11
   typedef basic_ofstream<wchar_t> wofstream;
   typedef basic_fstream<wchar_t>  wfstream;
 
-#if __cplusplus >= 202002L
+#if __cplusplus >= 202002L && _GLIBCXX_USE_CXX11_ABI
   typedef basic_syncbuf<wchar_t>     wsyncbuf;
   typedef basic_osyncstream<wchar_t> wosyncstream;
 #endif