On Sat, Mar 18, 2023 at 11:50:47AM +0000, Pádraig Brady wrote: > On 17/03/2023 21:51, Bruno Haible wrote: > > This set of patches adds support for the %b format string directive, > > required > > by ISO C 23, to the *printf family of functions. > > > > So far, only glibc implements it (since version 2.35). For portability to > > the > > other platforms, use the *printf-posix modules. > > For my reference mainly... > > It's interesting that this conflicts with the POSIX specified %b directive > for the printf(1) utility.
Another consideration: C23 admits that %#B is not available for portable use of outputting uppercase '0B...', you would have to manually write 0B%b instead. However, since glibc DOES support %B as the uppercase counterpart to %b, should we add that in gnulib (but this time under the auspices of *printf-gnu, rather than *printf-posix)? -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org