From owner-svn-src-all@freebsd.org Mon Nov 11 17:45:07 2019 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0958D1BA896; Mon, 11 Nov 2019 17:45:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47BdYt6V0Dz4Rls; Mon, 11 Nov 2019 17:45:06 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C1E471AEDA; Mon, 11 Nov 2019 17:45:06 +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 xABHj6ux005322; Mon, 11 Nov 2019 17:45:06 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xABHj6Bj005321; Mon, 11 Nov 2019 17:45:06 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201911111745.xABHj6Bj005321@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 11 Nov 2019 17:45:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r354626 - in stable: 11/contrib/libc++/include 12/contrib/libc++/include X-SVN-Group: stable-12 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 11/contrib/libc++/include 12/contrib/libc++/include X-SVN-Commit-Revision: 354626 X-SVN-Commit-Repository: base 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.29 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: Mon, 11 Nov 2019 17:45:07 -0000 Author: dim Date: Mon Nov 11 17:45:06 2019 New Revision: 354626 URL: https://svnweb.freebsd.org/changeset/base/354626 Log: MFC r354625: Merge commit 371ea70bb from llvm git (by Louis Dionne): [libc++] Harden usage of static_assert against C++03 In C++03, we emulate static_assert with a macro, and we must parenthesize multiple arguments. llvm-svn: 373328 This is a follow-up to r354460, which causes errors for pre-C++11 programs using , similar to: /usr/include/c++/v1/cmath:622:68: error: too many arguments provided to function-like macro invocation Reported by: antoine Modified: stable/12/contrib/libc++/include/cmath Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/contrib/libc++/include/cmath Directory Properties: stable/11/ (props changed) Modified: stable/12/contrib/libc++/include/cmath ============================================================================== --- stable/12/contrib/libc++/include/cmath Mon Nov 11 17:41:56 2019 (r354625) +++ stable/12/contrib/libc++/include/cmath Mon Nov 11 17:45:06 2019 (r354626) @@ -619,8 +619,8 @@ _LIBCPP_CONSTEXPR _IntT __max_representable_int_for_fl static_assert(is_floating_point<_FloatT>::value, "must be a floating point type"); static_assert(is_integral<_IntT>::value, "must be an integral type"); static_assert(numeric_limits<_FloatT>::radix == 2, "FloatT has incorrect radix"); - static_assert(is_same<_FloatT, float>::value || is_same<_FloatT, double>::value - || is_same<_FloatT,long double>::value, "unsupported floating point type"); + static_assert((is_same<_FloatT, float>::value || is_same<_FloatT, double>::value + || is_same<_FloatT,long double>::value), "unsupported floating point type"); return _FloatBigger ? numeric_limits<_IntT>::max() : (numeric_limits<_IntT>::max() >> _Bits << _Bits); }