From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7814) id 102C33857437; Sat, 2 Oct 2021 05:15:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 102C33857437 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Fangrui Song To: glibc-cvs@sourceware.org Subject: [glibc/maskray/unnest] Do not define tgmath.h fmaxmag, fminmag macros for C2X (bug 28397) X-Act-Checkin: glibc X-Git-Author: Joseph Myers X-Git-Refname: refs/heads/maskray/unnest X-Git-Oldrev: 90f0ac10a74b2d43b5a65aab4be40565e359be43 X-Git-Newrev: 79850e1025aabeccd3586c32ca259aa854607582 Message-Id: <20211002051509.102C33857437@sourceware.org> Date: Sat, 2 Oct 2021 05:15:09 +0000 (GMT) X-BeenThere: glibc-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Oct 2021 05:15:09 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=79850e1025aabeccd3586c32ca259aa854607582 commit 79850e1025aabeccd3586c32ca259aa854607582 Author: Joseph Myers Date: Wed Sep 29 17:38:32 2021 +0000 Do not define tgmath.h fmaxmag, fminmag macros for C2X (bug 28397) C2X does not include fmaxmag and fminmag. When I updated feature test macro handling accordingly (commit 858045ad1c5ac1682288bbcb3676632b97a21ddf, "Update floating-point feature test macro handling for C2X", included in 2.34), I missed updating tgmath.h so it doesn't define the corresponding type-generic macros unless __STDC_WANT_IEC_60559_BFP_EXT__ is defined; I've now reported this as bug 28397. Adjust the conditionals in tgmath.h accordingly. Tested for x86_64. Diff: --- math/tgmath.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/math/tgmath.h b/math/tgmath.h index 9868353c46..3d7b0998df 100644 --- a/math/tgmath.h +++ b/math/tgmath.h @@ -921,7 +921,9 @@ /* Like ilogb, but returning long int. */ # define llogb(Val) __TGMATH_UNARY_REAL_RET_ONLY (Val, llogb) +#endif +#if __GLIBC_USE (IEC_60559_BFP_EXT) /* Return value with maximum magnitude. */ # define fmaxmag(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, fmaxmag)