libstdc++: Include <typeinfo> even for -fno-rtti [PR 97758]
authorJonathan Wakely <jwakely@redhat.com>
Mon, 9 Nov 2020 10:09:51 +0000 (10:09 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Mon, 9 Nov 2020 14:28:37 +0000 (14:28 +0000)
commit99bf3a817b9d31905dd12448e853ad2685635250
treed0fe853b7ba76d7bc3300b1c01bc4dfcd7a6088a
parent8a713174440f80a65fc5363235ebf5301a618c2a
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>.
libstdc++-v3/include/bits/std_function.h