public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-4838] libstdc++: Include <typeinfo> even for -fno-rtti [PR 97758]
@ 2020-11-09 14:28 Jonathan Wakely
0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2020-11-09 14:28 UTC (permalink / raw)
To: gcc-cvs, libstdc++-cvs
https://gcc.gnu.org/g:99bf3a817b9d31905dd12448e853ad2685635250
commit r11-4838-g99bf3a817b9d31905dd12448e853ad2685635250
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Mon Nov 9 10:09:51 2020 +0000
libstdc++: Include <typeinfo> even for -fno-rtti [PR 97758]
The std::function code now uses std::type_info* even when RTTI is
disabled, so it should include <typeinfo> unconditionally. Without this,
Clang can't compile <functional> with -fno-rtti (it works with GCC
because std::type_info gets declared automatically by the compiler).
libstdc++-v3/ChangeLog:
PR libstdc++/97758
* include/bits/std_function.h [!__cpp_rtti]: Include <typeinfo>.
Diff:
---
libstdc++-v3/include/bits/std_function.h | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/libstdc++-v3/include/bits/std_function.h b/libstdc++-v3/include/bits/std_function.h
index 054d9cbbf02..1788b882a8a 100644
--- a/libstdc++-v3/include/bits/std_function.h
+++ b/libstdc++-v3/include/bits/std_function.h
@@ -36,9 +36,7 @@
# include <bits/c++0x_warning.h>
#else
-#if __cpp_rtti
-# include <typeinfo>
-#endif
+#include <typeinfo>
#include <bits/stl_function.h>
#include <bits/invoke.h>
#include <bits/refwrap.h>
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-11-09 14:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-09 14:28 [gcc r11-4838] libstdc++: Include <typeinfo> even for -fno-rtti [PR 97758] 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).