Subject: bug#70898: switching to <stdbit.h> for Emacs bit ops

From: Mattias Engdegård <[email-masked]>
Date: Mon, 13 May 2024 16:34:48 +0200

Has C23 been frozen yet? The most recent accessible draft I could find was N3096.

Overall happy with the changes but haven't read them in detail.
Minor things I stumbled upon:

> @@ -4269,7 +4263,9 @@ endif
>  ## begin gnulib module verify
>  ifeq (,$(OMIT_GNULIB_MODULE_verify))
>  
> +ifneq (,$(gl_GNULIB_ENABLED_verify_CONDITION))
>  
> +endif

Unfinished work?

> +/* 1 if supported, -1 if not, 0 if unknown.  */
> +extern signed char __gl_stdint_popcount_support;

`__gl_stdbit_popcount_support`, maybe?

(By the way, in case you are on the WG: the N3096 draft has

> 7.18.8 First Leading One
...
> Returns the most significant index of the first 1 bit in value, plus 1.

Someone jumbled that sentence. Something like "the index of the most significant 1 bit" was probably intended.