Skip to content
Snippets Groups Projects
Unverified Commit 6cc86982 authored by Jonathan Wakely's avatar Jonathan Wakely
Browse files

libstdc++: Guard dynamic_cast use in src/c++23/print.cc [PR115015]

Do not use dynamic_cast unconditionally, in case libstdc++ is built with
-fno-rtti.

libstdc++-v3/ChangeLog:

	PR libstdc++/115015
	* src/c++23/print.cc (__open_terminal(streambuf*)) [!__cpp_rtti]:
	Do not use dynamic_cast.
parent 0a99ad5c
No related branches found
No related tags found
No related merge requests found
......@@ -87,7 +87,7 @@ namespace
void*
__open_terminal(std::streambuf* sb)
{
#ifndef _GLIBCXX_USE_STDIO_PURE
#if ! defined _GLIBCXX_USE_STDIO_PURE && defined __cpp_rtti
using namespace __gnu_cxx;
if (auto fb = dynamic_cast<stdio_sync_filebuf<char>*>(sb))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment