From nobody Fri Jul 14 20:50:49 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4R2kCN4QZfz4mlq8; Fri, 14 Jul 2023 20:50:56 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4R2kCN2qHhz3KXm; Fri, 14 Jul 2023 20:50:56 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Authentication-Results: mx1.freebsd.org; none Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id A26303C0199; Fri, 14 Jul 2023 20:50:49 +0000 (UTC) Date: Fri, 14 Jul 2023 20:50:49 +0000 From: Brooks Davis To: Robert Clausecker Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 3f5788e0ed8e - main - lib/libc/string/ffs*.c: work around gcc warning Message-ID: References: <202307142027.36EKRZa8093531@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202307142027.36EKRZa8093531@gitrepo.freebsd.org> X-Rspamd-Queue-Id: 4R2kCN2qHhz3KXm X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:36236, ipnet:199.48.128.0/22, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Fri, Jul 14, 2023 at 08:27:35PM +0000, Robert Clausecker wrote: > The branch main has been updated by fuz: > > URL: https://cgit.FreeBSD.org/src/commit/?id=3f5788e0ed8e85567f651ad360596b8c330af5a9 > > commit 3f5788e0ed8e85567f651ad360596b8c330af5a9 > Author: Robert Clausecker > AuthorDate: 2023-07-10 22:10:52 +0000 > Commit: Robert Clausecker > CommitDate: 2023-07-14 20:26:43 +0000 > > lib/libc/string/ffs*.c: work around gcc warning > > Gcc warns of infinite recursion if we use __builtin_ffs*() to > implement ffs*(). This is because gcc uses ffs() to implement > these on some platforms. Sidestep the warning by using > __builtin_ctz*() for these. Thank you for fixing this. The warning seems to be rather bogus and we might be better off suppressing it as (based on poking at compiler explorer) the warning doesn't appear to apply to any architecture we care about and quite a few compilers generate worse code for the __builtin_ctz*() implementations (including gcc for x86-64 at -O2): https://godbolt.org/z/E174v96GT -- Brooks