public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
From: Alejandro Colomar <alx.manpages@gmail.com>
To: Joseph Myers <joseph@codesourcery.com>
Cc: "Cristian Rodríguez" <crrodriguez@opensuse.org>,
	"G. Branden Robinson" <g.branden.robinson@gmail.com>,
	"Jonny Grant" <jg@jguk.org>,
	"Florian Weimer" <fweimer@redhat.com>,
	"Michael Kerrisk" <mtk.manpages@gmail.com>,
	linux-man <linux-man@vger.kernel.org>,
	"GNU C Library" <libc-alpha@sourceware.org>
Subject: Re: [PATCH] Add example to rand.3
Date: Fri, 30 Dec 2022 19:58:43 +0100	[thread overview]
Message-ID: <ebd9ced5-cb9e-b110-9749-c5e1a54c640f@gmail.com> (raw)
In-Reply-To: <6df5ca5f-5a51-5922-be72-354aa8a29a7@codesourcery.com>


[-- Attachment #1.1: Type: text/plain, Size: 1094 bytes --]

Hi Joseph,

On 12/30/22 19:50, Joseph Myers wrote:
> On Fri, 30 Dec 2022, Alejandro Colomar via Libc-alpha wrote:
> 
>>> I expect to implement these functions in due course for glibc (not GCC,
>>> since these are library functions, with the usual requirements for
>>> definitions with external linkage, though most would also have inline
>>> header implementations based on existing longstanding built-in functions).
>>
>> Is there any builtin for stdc_bit_ceil()?  I've tried to search for it, but
>> didn't find it.  I came to the conclusion that I need to write the ugly code
>> around __builtin_clz().
> 
> I don't think there's such a built-in function, so yes, the inline
> function would need to use __builtin_clz.  (Even the stdc_leading_zeros
> inline functions will need to do more than just call __builtin_clz - they
> need to check for zero, since the standard functions have a defined result
> for a zero argument whereas __builtin_clz doesn't.)

Thanks for confirming.  That was my guess :|

Cheers,

Alex

> 

-- 
<http://www.alejandro-colomar.es/>

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2022-12-30 18:58 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-26 21:50 [PATCH] Add example to rand.3 Jonny Grant
2022-12-26 22:29 ` Alejandro Colomar
2022-12-27 13:07   ` Cristian Rodríguez
2022-12-27 23:33     ` Alejandro Colomar
2022-12-28  0:00       ` G. Branden Robinson
2022-12-28  0:41         ` Alejandro Colomar
2022-12-28 12:21           ` Cristian Rodríguez
2022-12-30 18:15             ` Joseph Myers
2022-12-30 18:20               ` Alejandro Colomar
2022-12-30 18:50                 ` Joseph Myers
2022-12-30 18:58                   ` Alejandro Colomar [this message]
2022-12-30 19:11               ` Cristian Rodríguez
2022-12-30 21:08                 ` Joseph Myers
2022-12-30 21:15                   ` Internal organization of "the implementation" (was: [PATCH] Add example to rand.3) Alejandro Colomar
2022-12-30 21:50                     ` Joseph Myers
2022-12-27 21:37   ` [PATCH] Add example to rand.3 Jonny Grant
2022-12-27 23:11     ` Alejandro Colomar
2022-12-28 20:51       ` Jonny Grant
2022-12-28 20:56         ` Alejandro Colomar
2022-12-28 21:03           ` Alejandro Colomar
2022-12-28 21:04             ` Alejandro Colomar
2022-12-28 21:25               ` Jonny Grant
2022-12-28 21:32                 ` Alejandro Colomar
2022-12-28 21:04           ` Cristian Rodríguez
2022-12-28 21:11             ` Alejandro Colomar
2022-12-28 21:19               ` Jonny Grant
2022-12-28 21:18             ` Alejandro Colomar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ebd9ced5-cb9e-b110-9749-c5e1a54c640f@gmail.com \
    --to=alx.manpages@gmail.com \
    --cc=crrodriguez@opensuse.org \
    --cc=fweimer@redhat.com \
    --cc=g.branden.robinson@gmail.com \
    --cc=jg@jguk.org \
    --cc=joseph@codesourcery.com \
    --cc=libc-alpha@sourceware.org \
    --cc=linux-man@vger.kernel.org \
    --cc=mtk.manpages@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox