[PATCH v2] Support C2X printf %b, %B

Florian Weimer fweimer@redhat.com
Wed Nov 10 09:27:18 GMT 2021


* Joseph Myers:

> +@item @samp{%b}, @samp{%B}
> +Print an integer as an unsigned binary number.  @samp{%b} uses
> +lower-case @samp{b} with the @samp{#} flag and @samp{%B} uses
> +upper-case.  @samp{%b} is an ISO C2X feature; @samp{%B} is an
> +extension recommended by ISO C2X.  @xref{Integer Conversions}, for
> +details.

The new tests do not contain any negative input numbers.  Do they result
in undefined behavior?

The code changes themselves look okay to me.

Thanks,
Florian



More information about the Libc-alpha mailing list