From patchwork Sun Nov 9 21:53:18 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alejandro Colomar X-Patchwork-Id: 123851 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 19F333858C36 for ; Sun, 9 Nov 2025 22:07:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 19F333858C36 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=uO0YOXG8 X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) by sourceware.org (Postfix) with ESMTPS id E87A73858C36 for ; Sun, 9 Nov 2025 21:53:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E87A73858C36 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kernel.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E87A73858C36 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=172.105.4.254 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1762725202; cv=none; b=wvbeLUPzzUpTxYEX98P+e01p2GMA/6lTQ+5lMRhOURpJM4Uj9UZGB7RNNy6vRMuSL6CCIZRWwd102CqSHC+0QcVc2L6iud6sbwJqlgEWP7QS8bifZM8LG3K1uV6nOmS7HpZFscQ7l2sC4eJxAiNkpPiJII0mpj51yepkwNNHoTQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1762725202; c=relaxed/simple; bh=dkNn3fqw1eG2naJ8U1U579lKGIdTFVKWBteJqZ9cbYw=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=R6V10gCBm+HjFNNOkKmzAvLdGeEF2pB1lU7dIClvfwFQ70PJ3rUHy8j+/SyNp3NkGFSJtmtmmsHF633LmezNxsB6hxXkoxMipRpF3Q5yzsYghhUXzxlWmrGAzxugnBHPaacFOXJ+2u+xw0l5RITNPoVO/Bx025jvcNsMEa82RFw= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E87A73858C36 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id 92D0260051 for ; Sun, 9 Nov 2025 21:53:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 97123C19421; Sun, 9 Nov 2025 21:53:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1762725201; bh=dkNn3fqw1eG2naJ8U1U579lKGIdTFVKWBteJqZ9cbYw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=uO0YOXG8h/7zFNNNinFOdZ1GLfsFyans0909UVMTfml98VDk+RkUxS1AFggRs928g jAOxIBRcS92a0lK6XWCzfwyJ5+qSmUyhfJAAYMVBr2TpbZ28a4OnKGfYUtHDSyNkbF IMpPnvnrtXVbW7PjEpNRitAb/60DCkcUmzpnC9jouiuAEFWgHL+QQ8b4qqlEbyg3QJ mPJNqn/kpbHyiJ5hwN+tkeNIDFCehrdZ5w+e+nauw1GF7C9ikOCgrvEEjLkyiTomq9 5YCAGx3Bp1YpBocPMedCuD2loDo2kRPNPnpwlG+SQw4KcxL4W7HTt4QAU028hNAA0k J/mnJj/UwB4/A== Date: Sun, 9 Nov 2025 22:53:18 +0100 From: Alejandro Colomar To: libc-alpha@sourceware.org Cc: Alejandro Colomar Subject: [PATCH v1 13/35] Remove dead code due to _GL_HAVE___TYPEOF__ macro Message-ID: <38d0cd6957919086498a3d598261f3ac90c7edf3.1762725057.git.alx@kernel.org> X-Mailer: git-send-email 2.51.0 References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org It's unconditionally defined as 1. Signed-off-by: Alejandro Colomar --- include/intprops.h | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/include/intprops.h b/include/intprops.h index 149513a1d0..64526a8edf 100644 --- a/include/intprops.h +++ b/include/intprops.h @@ -82,19 +82,11 @@ If this is a problem for you, please let us know how to fix it for your host. This assumption is tested by the intprops-tests module. */ -/* Does the __typeof__ keyword work? This could be done by - 'configure', but for now it's easier to do it by hand. */ -# define _GL_HAVE___TYPEOF__ 1 - -/* Return 1 if the integer type or expression T might be signed. Return 0 - if it is definitely unsigned. T must not be a bit-field expression. +/* Return 1 if the integer type or expression T is signed. Return 0 + if it is unsigned. T must not be a bit-field expression. This macro does not evaluate its argument, and expands to an integer constant expression. */ -#if _GL_HAVE___TYPEOF__ # define _GL_SIGNED_TYPE_OR_EXPR(t) TYPE_SIGNED (__typeof__ (t)) -#else -# define _GL_SIGNED_TYPE_OR_EXPR(t) 1 -#endif /* Bound on length of the string representing an unsigned integer value representable in B bits. log10 (2.0) < 146/485. The @@ -413,21 +405,10 @@ signed, its type is ST with bounds SMIN..SMAX; otherwise its type is UT with bounds U..UMAX. ST and UT are narrower than int. Return 1 if the result overflows. See above for restrictions. */ -# if _GL_HAVE___TYPEOF__ # define _GL_INT_OP_WRAPV_SMALLISH(a,b,r,op,overflow,st,smin,smax,ut,umax) \ (TYPE_SIGNED (__typeof__ (*(r))) \ ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, st, smin, smax) \ : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, ut, 0, umax)) -# else -# define _GL_INT_OP_WRAPV_SMALLISH(a,b,r,op,overflow,st,smin,smax,ut,umax) \ - (overflow (a, b, smin, smax) \ - ? (overflow (a, b, 0, umax) \ - ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a,b,op,unsigned,st), 1) \ - : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a,b,op,unsigned,st)) < 0) \ - : (overflow (a, b, 0, umax) \ - ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a,b,op,unsigned,st)) >= 0 \ - : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a,b,op,unsigned,st), 0))) -# endif # define _GL_INT_OP_WRAPV(a, b, r, op, overflow) \ (sizeof *(r) == sizeof (signed char) \