From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lxmtout1.gsi.de (lxmtout1.gsi.de [140.181.3.111]) by sourceware.org (Postfix) with ESMTPS id 1EAFE3858402; Mon, 17 Jan 2022 10:21:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1EAFE3858402 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gsi.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gsi.de Received: from localhost (localhost [127.0.0.1]) by lxmtout1.gsi.de (Postfix) with ESMTP id 981782050D12; Mon, 17 Jan 2022 11:21:42 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at lxmtout1.gsi.de Received: from lxmtout1.gsi.de ([127.0.0.1]) by localhost (lxmtout1.gsi.de [127.0.0.1]) (amavisd-new, port 10024) with LMTP id giAfBhCFuCiS; Mon, 17 Jan 2022 11:21:42 +0100 (CET) Received: from srvex3.campus.gsi.de (unknown [10.10.4.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by lxmtout1.gsi.de (Postfix) with ESMTPS id 6D5582050D08; Mon, 17 Jan 2022 11:21:42 +0100 (CET) Received: from minbar.localnet (140.181.3.12) by srvex3.campus.gsi.de (10.10.4.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2375.17; Mon, 17 Jan 2022 11:21:42 +0100 From: Matthias Kretz To: , Subject: [PATCH] libstdc++: Don't fail if math_errhandling is not defined Date: Mon, 17 Jan 2022 11:21:41 +0100 Message-ID: <8121446.T7Z3S40VBb@minbar> Organization: GSI Helmholtz Centre for Heavy Ion Research MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="nextPart10124391.nUPlyArG6x" Content-Transfer-Encoding: 7Bit X-Originating-IP: [140.181.3.12] X-ClientProxiedBy: srvex4.Campus.gsi.de (10.10.4.36) To srvex3.campus.gsi.de (10.10.4.16) X-Spam-Status: No, score=-10.3 required=5.0 tests=BAYES_00, BODY_8BITS, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Jan 2022 10:21:46 -0000 --nextPart10124391.nUPlyArG6x Content-Transfer-Encoding: base64 Content-Type: text/plain; charset="UTF-8" VGVzdGVkIG9uIHg4Nl82NC1saW51eCBhbmQgcG93ZXJwYzY0bGUtbGludXguIFRoaXMgZml4ZXMg dGhlIHBvd2VycGM2NGxlLWxpbnV4IApmYWlsdXJlIEpvbmF0aGFuIHJlcG9ydGVkLiBPSyBmb3Ig dHJ1bms/CgoKT2xkZXIgZ2xpYmMgZG9lcyBub3QgZGVmaW5lIG1hdGhfZXJyaGFuZGxpbmcgd2l0 aCAtZmZhc3QtbWF0aCwgaW4gd2hpY2gKY2FzZSBmbG9hdGluZy1wb2ludCBleGNlcHRpb25zIGFy ZSBub3QgdXNlZC4KClNpZ25lZC1vZmYtYnk6IE1hdHRoaWFzIEtyZXR6IDxtLmtyZXR6QGdzaS5k ZT4KCmxpYnN0ZGMrKy12My9DaGFuZ2VMb2c6CgoJKiBpbmNsdWRlL2V4cGVyaW1lbnRhbC9iaXRz L3NpbWQuaCAoX19mbG9hdGluZ19wb2ludF9mbGFncyk6IERvCglub3QgcmVseSBvbiB0aGUgcHJl c2VuY2Ugb2YgdGhlIG1hdGhfZXJyaGFuZGxpbmcgbWFjcm8uCi0tLQogbGlic3RkYysrLXYzL2lu Y2x1ZGUvZXhwZXJpbWVudGFsL2JpdHMvc2ltZC5oIHwgMTEgKysrKysrKysrKy0KIDEgZmlsZSBj aGFuZ2VkLCAxMCBpbnNlcnRpb25zKCspLCAxIGRlbGV0aW9uKC0pCgoKLS0K4pSA4pSA4pSA4pSA 4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSA 4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSA 4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSA 4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pSACiBEci4gTWF0dGhpYXMgS3Jl dHogICAgICAgICAgICAgICAgICAgICAgICAgICBodHRwczovL21hdHRrcmV0ei5naXRodWIuaW8K IEdTSSBIZWxtaG9sdHogQ2VudHJlIGZvciBIZWF2eSBJb24gUmVzZWFyY2ggICAgICAgICAgICAg ICBodHRwczovL2dzaS5kZQogc3Rk4oKTOjpzaW1kCuKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKU gOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKU gOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKU gOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKU gOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgA== --nextPart10124391.nUPlyArG6x Content-Disposition: inline; filename="0001-libstdc-Don-t-fail-if-math_errhandling-is-not-define.patch" Content-Transfer-Encoding: 7Bit Content-Type: text/x-patch; charset="utf-8"; name="0001-libstdc-Don-t-fail-if-math_errhandling-is-not-define.patch" diff --git a/libstdc++-v3/include/experimental/bits/simd.h b/libstdc++-v3/include/experimental/bits/simd.h index d837d0efb21..c991e3f223e 100644 --- a/libstdc++-v3/include/experimental/bits/simd.h +++ b/libstdc++-v3/include/experimental/bits/simd.h @@ -283,11 +283,20 @@ constexpr inline bool __have_power_vmx = __have_power_vsx; namespace __detail { + constexpr bool __handle_fpexcept = +#ifdef math_errhandling + math_errhandling & MATH_ERREXCEPT; +#elif defined __FAST_MATH__ + false; +#else + true; +#endif + constexpr std::uint_least64_t __floating_point_flags() { std::uint_least64_t __flags = 0; - if constexpr (math_errhandling & MATH_ERREXCEPT) + if constexpr (__handle_fpexcept) __flags |= 1; #ifdef __FAST_MATH__ __flags |= 1 << 1; --nextPart10124391.nUPlyArG6x--