From owner-svn-src-all@freebsd.org Fri Oct 9 21:04:30 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 984199D1AD9; Fri, 9 Oct 2015 21:04:30 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6BE531DC1; Fri, 9 Oct 2015 21:04:30 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t99L4Tsp006527; Fri, 9 Oct 2015 21:04:29 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t99L4Sag006522; Fri, 9 Oct 2015 21:04:28 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201510092104.t99L4Sag006522@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 9 Oct 2015 21:04:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289082 - head/contrib/libc++/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2015 21:04:30 -0000 Author: dim Date: Fri Oct 9 21:04:28 2015 New Revision: 289082 URL: https://svnweb.freebsd.org/changeset/base/289082 Log: 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 Modified: head/contrib/libc++/include/__hash_table head/contrib/libc++/include/__std_stream head/contrib/libc++/include/functional head/contrib/libc++/include/memory head/contrib/libc++/include/string Modified: head/contrib/libc++/include/__hash_table ============================================================================== --- head/contrib/libc++/include/__hash_table Fri Oct 9 21:00:04 2015 (r289081) +++ head/contrib/libc++/include/__hash_table Fri Oct 9 21:04:28 2015 (r289082) @@ -984,15 +984,17 @@ public: __equal_range_multi(const _Key& __k) const; void swap(__hash_table& __u) +#if _LIBCPP_STD_VER <= 11 _NOEXCEPT_( __is_nothrow_swappable::value && __is_nothrow_swappable::value -#if _LIBCPP_STD_VER <= 11 && (!allocator_traits<__pointer_allocator>::propagate_on_container_swap::value || __is_nothrow_swappable<__pointer_allocator>::value) && (!__node_traits::propagate_on_container_swap::value || __is_nothrow_swappable<__node_allocator>::value) -#endif ); +#else + _NOEXCEPT_(__is_nothrow_swappable::value && __is_nothrow_swappable::value); +#endif _LIBCPP_INLINE_VISIBILITY size_type max_bucket_count() const _NOEXCEPT @@ -2351,15 +2353,17 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc> template void __hash_table<_Tp, _Hash, _Equal, _Alloc>::swap(__hash_table& __u) +#if _LIBCPP_STD_VER <= 11 _NOEXCEPT_( __is_nothrow_swappable::value && __is_nothrow_swappable::value -#if _LIBCPP_STD_VER <= 11 && (!allocator_traits<__pointer_allocator>::propagate_on_container_swap::value || __is_nothrow_swappable<__pointer_allocator>::value) && (!__node_traits::propagate_on_container_swap::value || __is_nothrow_swappable<__node_allocator>::value) -#endif ) +#else + _NOEXCEPT_(__is_nothrow_swappable::value && __is_nothrow_swappable::value) +#endif { { __node_pointer_pointer __npp = __bucket_list_.release(); Modified: head/contrib/libc++/include/__std_stream ============================================================================== --- head/contrib/libc++/include/__std_stream Fri Oct 9 21:00:04 2015 (r289081) +++ head/contrib/libc++/include/__std_stream Fri Oct 9 21:04:28 2015 (r289082) @@ -276,7 +276,6 @@ __stdoutbuf<_CharT>::overflow(int_type _ codecvt_base::result __r; char_type* pbase = &__1buf; char_type* pptr = pbase + 1; - char_type* epptr = pptr; do { const char_type* __e; Modified: head/contrib/libc++/include/functional ============================================================================== --- head/contrib/libc++/include/functional Fri Oct 9 21:00:04 2015 (r289081) +++ head/contrib/libc++/include/functional Fri Oct 9 21:04:28 2015 (r289082) @@ -2402,14 +2402,14 @@ struct _LIBCPP_TYPE_VIS_ONLY hash::operator()(__v); #endif Modified: head/contrib/libc++/include/memory ============================================================================== --- head/contrib/libc++/include/memory Fri Oct 9 21:00:04 2015 (r289081) +++ head/contrib/libc++/include/memory Fri Oct 9 21:04:28 2015 (r289082) @@ -3420,7 +3420,7 @@ struct __scalar_hash<_Tp, 2> { size_t __a; size_t __b; - }; + } __s; } __u; __u.__t = __v; return __murmur2_or_cityhash()(&__u, sizeof(__u)); @@ -3442,7 +3442,7 @@ struct __scalar_hash<_Tp, 3> size_t __a; size_t __b; size_t __c; - }; + } __s; } __u; __u.__t = __v; return __murmur2_or_cityhash()(&__u, sizeof(__u)); @@ -3465,7 +3465,7 @@ struct __scalar_hash<_Tp, 4> size_t __b; size_t __c; size_t __d; - }; + } __s; } __u; __u.__t = __v; return __murmur2_or_cityhash()(&__u, sizeof(__u)); Modified: head/contrib/libc++/include/string ============================================================================== --- head/contrib/libc++/include/string Fri Oct 9 21:00:04 2015 (r289081) +++ head/contrib/libc++/include/string Fri Oct 9 21:04:28 2015 (r289082) @@ -1936,7 +1936,12 @@ basic_string<_CharT, _Traits, _Allocator 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);