From owner-svn-src-all@freebsd.org Sun Mar 27 21:20:44 2016 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 96F25ADF117; Sun, 27 Mar 2016 21:20:44 +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 614711384; Sun, 27 Mar 2016 21:20:44 +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 u2RLKh2s083604; Sun, 27 Mar 2016 21:20:43 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2RLKhma083603; Sun, 27 Mar 2016 21:20:43 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201603272120.u2RLKhma083603@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 27 Mar 2016 21:20:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r297322 - 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.21 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: Sun, 27 Mar 2016 21:20:44 -0000 Author: dim Date: Sun Mar 27 21:20:43 2016 New Revision: 297322 URL: https://svnweb.freebsd.org/changeset/base/297322 Log: Pull in r255683 from upstream libc++ trunk (by Eric Fiselier): [libcxx] Enable noexcept for GCC 4.6 and greater Summary: This patch allows GCC 4.6 and above to use `noexcept` as opposed to `throw()`. Is it an ABI safe change to suddenly switch on `noexcept`? I imagine it must be because it's disabled in w/ clang in C++03 but not C++11. Reviewers: danalbert, jroelofs, mclow.lists Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D15516 This should fix errors from gcc 4.6 and higher when compiling llvm-cov and/or other llvm tools. Reported by: bdrewery Modified: head/contrib/libc++/include/__config Modified: head/contrib/libc++/include/__config ============================================================================== --- head/contrib/libc++/include/__config Sun Mar 27 20:02:21 2016 (r297321) +++ head/contrib/libc++/include/__config Sun Mar 27 21:20:43 2016 (r297322) @@ -364,14 +364,8 @@ typedef __char32_t char32_t; #endif #endif -#if (__has_feature(cxx_noexcept)) -# define _NOEXCEPT noexcept -# define _NOEXCEPT_(x) noexcept(x) -# define _NOEXCEPT_OR_FALSE(x) noexcept(x) -#else -# define _NOEXCEPT throw() -# define _NOEXCEPT_(x) -# define _NOEXCEPT_OR_FALSE(x) false +#if !(__has_feature(cxx_noexcept)) +#define _LIBCPP_HAS_NO_NOEXCEPT #endif #if __has_feature(underlying_type) @@ -439,10 +433,6 @@ namespace std { #define _LIBCPP_HAS_NO_VARIABLE_TEMPLATES #endif -#define _NOEXCEPT throw() -#define _NOEXCEPT_(x) -#define _NOEXCEPT_OR_FALSE(x) false - #ifndef __GXX_EXPERIMENTAL_CXX0X__ #define _LIBCPP_HAS_NO_ADVANCED_SFINAE @@ -456,6 +446,7 @@ namespace std { #define _LIBCPP_HAS_NO_RVALUE_REFERENCES #define _LIBCPP_HAS_NO_ALWAYS_INLINE_VARIADICS #define _LIBCPP_HAS_NO_STRONG_ENUMS +#define _LIBCPP_HAS_NO_NOEXCEPT #else // __GXX_EXPERIMENTAL_CXX0X__ @@ -479,6 +470,7 @@ namespace std { #endif // _GNUC_VER < 404 #if _GNUC_VER < 406 +#define _LIBCPP_HAS_NO_NOEXCEPT #define _LIBCPP_HAS_NO_NULLPTR #endif @@ -513,15 +505,14 @@ using namespace _LIBCPP_NAMESPACE __attr #define _LIBCPP_HAS_NO_UNICODE_CHARS #define _LIBCPP_HAS_NO_DELETED_FUNCTIONS #define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS +#define _LIBCPP_HAS_NO_NOEXCEPT #define __alignof__ __alignof #define _LIBCPP_NORETURN __declspec(noreturn) #define _LIBCPP_UNUSED #define _ALIGNAS(x) __declspec(align(x)) #define _LIBCPP_HAS_NO_VARIADICS -#define _NOEXCEPT throw () -#define _NOEXCEPT_(x) -#define _NOEXCEPT_OR_FALSE(x) false + #define _LIBCPP_BEGIN_NAMESPACE_STD namespace std { #define _LIBCPP_END_NAMESPACE_STD } @@ -541,14 +532,11 @@ namespace std { #define _LIBCPP_NORETURN __attribute__((noreturn)) #define _LIBCPP_UNUSED -#define _NOEXCEPT throw() -#define _NOEXCEPT_(x) -#define _NOEXCEPT_OR_FALSE(x) false - #define _LIBCPP_HAS_NO_TEMPLATE_ALIASES #define _LIBCPP_HAS_NO_ADVANCED_SFINAE #define _LIBCPP_HAS_NO_ALWAYS_INLINE_VARIADICS #define _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS +#define _LIBCPP_HAS_NO_NOEXCEPT #define _LIBCPP_HAS_NO_NULLPTR #define _LIBCPP_HAS_NO_UNICODE_CHARS #define _LIBCPP_HAS_IS_BASE_OF @@ -572,6 +560,14 @@ namespace std { #endif // __clang__ || __GNUC__ || _MSC_VER || __IBMCPP__ +#ifndef _LIBCPP_HAS_NO_NOEXCEPT +# define _NOEXCEPT noexcept +# define _NOEXCEPT_(x) noexcept(x) +#else +# define _NOEXCEPT throw() +# define _NOEXCEPT_(x) +#endif + #ifdef _LIBCPP_HAS_NO_UNICODE_CHARS typedef unsigned short char16_t; typedef unsigned int char32_t;