From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2FF22385843A; Tue, 16 May 2023 19:47:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2FF22385843A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1684266445; bh=G2B8g0p7xtopgnrgKYXqnk+hSyNvgYxJqiLFm8JKYDw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=IFhZIcM8ZxRhyai8nDvMbtu8/H4xng9KnCOEFmgwh3Fmj04ZjbEck2XczTTQsk5O/ Ey8m+0MiZwlTp5XjZMJdf6jKvnHKIeQ4wQXUnLlCVcW5qVEsO4JRh6uFwfmB1fovsB VlAaybSdnh2ZX4pLUWCamTncPqd4HCRCmE/HeyI8= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/98202] C++ cannot parse F128 suffix for float128 literals Date: Tue, 16 May 2023 19:47:24 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: DUPLICATE X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98202 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #4 from Jakub Jelinek --- Other option would be just hardcode those 4 constants by hand: #define __FLT128_MAX__ 1.18973149535723176508575932662800702e+4932F128 #define __FLT128_NORM_MAX__ 1.18973149535723176508575932662800702e+4932F128 #define __FLT128_MIN__ 3.36210314311209350626267781732175260e-4932F128 #define __FLT128_EPSILON__ 1.92592994438723585305597794258492732e-34F128 #define __FLT128_DENORM_MIN__ 6.47517511943802511092443895822764655e-4966F1= 28 with __extension__ before it and Q suffix instead of F128. For __float128 I think those constants aren't going to change. Advantage of doing that would be that even various versions of clang++ supp= ort that, while F128 suffix isn't supported. So, use: (__extension__ 0x1.ffffffffffffffffffffffffffffp+16383Q) (__extension__ 0x1.ffffffffffffffffffffffffffffp+16383Q) (__extension__ 0x1.0000000000000000000000000000p-16382Q) (__extension__ 0x1.0000000000000000000000000000p-112Q) (__extension__ 0x0.0000000000000000000000000001p-16382Q) instead of those 4 constants.=