From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id 58C313857812; Mon, 9 Nov 2020 14:28:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 58C313857812 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Jonathan Wakely To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r11-4838] libstdc++: Include even for -fno-rtti [PR 97758] X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/master X-Git-Oldrev: 8a713174440f80a65fc5363235ebf5301a618c2a X-Git-Newrev: 99bf3a817b9d31905dd12448e853ad2685635250 Message-Id: <20201109142859.58C313857812@sourceware.org> Date: Mon, 9 Nov 2020 14:28:59 +0000 (GMT) X-BeenThere: libstdc++-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Nov 2020 14:28:59 -0000 https://gcc.gnu.org/g:99bf3a817b9d31905dd12448e853ad2685635250 commit r11-4838-g99bf3a817b9d31905dd12448e853ad2685635250 Author: Jonathan Wakely Date: Mon Nov 9 10:09:51 2020 +0000 libstdc++: Include even for -fno-rtti [PR 97758] The std::function code now uses std::type_info* even when RTTI is disabled, so it should include unconditionally. Without this, Clang can't compile 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 . 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 #else -#if __cpp_rtti -# include -#endif +#include #include #include #include