From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gnu.wildebeest.org (gnu.wildebeest.org [45.83.234.184]) by sourceware.org (Postfix) with ESMTPS id 7FADF38582B8 for ; Thu, 1 Feb 2024 10:23:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7FADF38582B8 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=klomp.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 7FADF38582B8 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=45.83.234.184 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706783012; cv=none; b=hOSZOpEz4kqhQvsPdE+e2XNW8fv2yRyFOL/SCBfdXv9LMVZ3i2CK8cJamU7cWVxgbe6xwXpPgfDAJj/o4DcoBFYaFLj4gky2DiOxEIlfFTJ/kRbqw3E6F7prJ1llKzPcnjLbazKwpj/3z32vbrmRyFPBs109wDUb2ldgxTUbbnQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706783012; c=relaxed/simple; bh=OWY0KGdZAOI5axGyVyGvOHNQzvDI/Pqua4pHLXVfrts=; h=Date:From:To:Subject:Message-ID:MIME-Version; b=k0+M/b9Q6ZRmMkijQPxiuTKDQrUeRnpHUHbb88PR3QIpniLZ6CPmnlKrMmqq3nS4kcNW7J5jpG9d5dV9wlqiVE761evDkqMyoeBU35WGtrWQOmJCdNUOd++V/8kT4CUA+tG3VpX/7QX+N3wEFtfZDx7ER8PYE+h+mDTOky1oZ50= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by gnu.wildebeest.org (Postfix, from userid 1000) id 89147302FDEA; Thu, 1 Feb 2024 11:23:28 +0100 (CET) Date: Thu, 1 Feb 2024 11:23:28 +0100 From: Mark Wielaard To: Jakub Jelinek Cc: Joseph Myers , "Andreas K. Huettel" , libc-alpha@sourceware.org Subject: Re: [PATCH] v4: Use gcc __builtin_stdc_* builtins in stdbit.h if possible Message-ID: <20240201102328.GB867@gnu.wildebeest.org> References: <7aa693ad-514e-7b7a-8d3-2c59af649ca@redhat.com> <1b65b9a1-2ae6-52f-c352-8ae2ba52ee24@redhat.com> <23ea145a-5250-3770-9789-c48ea4b417eb@redhat.com> <7bc9dd4-8e6c-a942-8394-e2c856bd8b6@redhat.com> <20240201101253.GA867@gnu.wildebeest.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240201101253.GA867@gnu.wildebeest.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-9.2 required=5.0 tests=BAYES_00,GIT_PATCH_0,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,KAM_SHORT,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Thu, Feb 01, 2024 at 11:12:53AM +0100, Mark Wielaard wrote: > On Mon, Jan 29, 2024 at 11:10:41PM +0100, Jakub Jelinek wrote: > > diff --git a/manual/stdbit.texi b/manual/stdbit.texi > > index fe41c671d8..8688930f12 100644 > > --- a/manual/stdbit.texi > > +++ b/manual/stdbit.texi > > @@ -32,7 +32,13 @@ and @code{unsigned long long int}. In addition, there is a > > corresponding type-generic macro (not listed below), named the same as > > the functions but without any suffix such as @samp{_uc}. The > > type-generic macro can only be used with an argument of an unsigned > > -integer type with a width of 8, 16, 32 or 64 bits. > > +integer type with a width of 8, 16, 32 or 64 bits, or when using > > +a compiler with support for > > +@uref{https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html@code{__builtin_stdc_bit_ceil}}, > > +etc.@:, built-in functions such as GCC 14.1 or later > > +any unsigned integer type those built-in functions support. > > +In GCC 14.1 that includes support for @code{unsigned __int128} and > > +@code{unsigned _BitInt(@var{n})} if supported by the target. > > > > @deftypefun {unsigned int} stdc_leading_zeros_uc (unsigned char @var{x}) > > @deftypefunx {unsigned int} stdc_leading_zeros_us (unsigned short @var{x}) > > make pdf didn't like that new @uref construct: > https://builder.sourceware.org/buildbot/#/builders/264/builds/282 > https://builder.sourceware.org/buildbot/api/v2/logs/7481911/raw > > (/home/builder/shared/snapshots/worker/glibc-snapshots-trunk/glibc-build/glibc- > dist/manual/stdbit.texi Chapter 21 [668] > /home/builder/shared/snapshots/worker/glibc-snapshots-trunk/glibc-build/glibc-d > ist/manual/stdbit.texi:37: Argument of @temp has an extra }. > > @par > > } > @pdfurl ...btype /Link /A << /S /URI /URI (#1) >>} > @endgroup > @urefbreakfinish ...sh ->@unsepspaces @pdfurl {#1} > @setbox 0 = @hbox {@ignore... > l.37 ...iltins.html@code{__builtin_stdc_bit_ceil}} > , > ? > /home/builder/shared/snapshots/worker/glibc-snapshots-trunk/glibc-build/glibc-d > ist/manual/stdbit.texi:37: Emergency stop. > > @par > > } > @pdfurl ...btype /Link /A << /S /URI /URI (#1) >>} > @endgroup > @urefbreakfinish ...sh ->@unsepspaces @pdfurl {#1} > @setbox 0 = @hbox {@ignore... > l.37 ...iltins.html@code{__builtin_stdc_bit_ceil}} > , > /home/builder/shared/snapshots/worker/glibc-snapshots-trunk/glibc-build/glibc-d > ist/manual/stdbit.texi:37: ==> Fatal error occurred, no output PDF file produc > ed! > > make info; make html; make dvi > are all fine however. But do note that the URL doesn't come out correctly even in the HTML case: https://snapshots.sourceware.org/glibc/trunk/latest/manual/libc.html#Bit-Manipulation It shows and links to: https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html__builtin_stdc_bit_ceil which should be: https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html#index-_005f_005fbuiltin_005fstdc_005fbit_005fceil Cheers, Mark