diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2020-11-09 10:09:51 +0000 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2020-11-09 14:28:37 +0000 |
commit | 99bf3a817b9d31905dd12448e853ad2685635250 (patch) | |
tree | d0fe853b7ba76d7bc3300b1c01bc4dfcd7a6088a | |
parent | 8a713174440f80a65fc5363235ebf5301a618c2a (diff) | |
download | gcc-99bf3a817b9d31905dd12448e853ad2685635250.zip gcc-99bf3a817b9d31905dd12448e853ad2685635250.tar.gz gcc-99bf3a817b9d31905dd12448e853ad2685635250.tar.bz2 |
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>.
-rw-r--r-- | libstdc++-v3/include/bits/std_function.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libstdc++-v3/include/bits/std_function.h b/libstdc++-v3/include/bits/std_function.h index 054d9cb..1788b88 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> |