From c8b9e1b4f19c160f314955218d6d9a442821ef43 Mon Sep 17 00:00:00 2001 From: dim Date: Fri, 9 Oct 2015 21:04:28 +0000 Subject: Pull in r242623 from upstream libc++ trunk (by Eric Fiselier): Enable and fix warnings during the build. Although CMake adds warning flags, they are ignored in the libc++ headers because the headers '#pragma system header' themselves. This patch disables the system header pragma when building libc++ and fixes the warnings that arose. The warnings fixed were: 1. - anonymous structs are a GNU extension 2. - anonymous structs are a GNU extension. 3. <__hash_table> - Embedded preprocessor directives have undefined behavior. 4. - Definition is missing noexcept from declaration. 5. <__std_stream> - Unused variable. This should fix building world (in particular libatf-c++) with -std=c++11. Reported by: Oliver Hartmann --- contrib/libc++/include/string | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'contrib/libc++/include/string') diff --git a/contrib/libc++/include/string b/contrib/libc++/include/string index 6be2195..5777ee2 100644 --- a/contrib/libc++/include/string +++ b/contrib/libc++/include/string @@ -1936,7 +1936,12 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string() template inline _LIBCPP_INLINE_VISIBILITY basic_string<_CharT, _Traits, _Allocator>::basic_string(const allocator_type& __a) - : __r_(__a) +#if _LIBCPP_STD_VER <= 14 + _NOEXCEPT_(is_nothrow_copy_constructible::value) +#else + _NOEXCEPT +#endif +: __r_(__a) { #if _LIBCPP_DEBUG_LEVEL >= 2 __get_db()->__insert_c(this); -- cgit v1.1