From: "Jₑₙₛ Gustedt" <jens.gustedt@inria.fr>
To: Rich Felker <dalias@libc.org>
Cc: musl@lists.openwall.com
Subject: Re: [musl] [PATCH] vfprintf: support C2x %b and %B conversion specifiers
Date: Tue, 20 Sep 2022 17:20:11 +0200 [thread overview]
Message-ID: <20220920172011.755587cd@inria.fr> (raw)
In-Reply-To: <20220920144617.GQ9709@brightrain.aerifal.cx>
[-- Attachment #1: Type: text/plain, Size: 1656 bytes --]
Rich,
on Tue, 20 Sep 2022 10:46:18 -0400 you (Rich Felker <dalias@libc.org>)
wrote:
> On Tue, Sep 20, 2022 at 04:27:28PM +0200, Jₑₙₛ Gustedt wrote:
> > on Tue, 20 Sep 2022 16:22:36 +0200 you (Jₑₙₛ Gustedt
> > <jens.gustedt@inria.fr>) wrote:
> >
> > > There is a feature test macro for the maximum width of bit-precise
> > > integers, `BITINT_MAXWIDTH`. It is guaranteed to be at least
> > > `ULLONG_WIDTH` but can (and will) be larger on many platforms.
> >
> > e.g on my ubuntu-nothing-fancy machine I get
> >
> > clang -E -dM -xc /dev/null | grep -i bitint
> > #define __BITINT_MAXWIDTH__ 128
>
> As I understand it, that gives the application knowledge of what
> bit-precise types the compiler can provide to it, but doesn't do
> anything to tell the application what wN modifiers printf can be
> expected to support. If it were required to support wN for
> N==BITINT_MAXWIDTH that would at least be something to go from, but I
> see no such requirement and I'm not sure it's desirable (it means you
> can't let the compiler offer larger BITINT_MAXWIDTH, but would have to
> define it as what libc supports).
>
> I think a separate macro indicating what printf supports is needed to
> solve this problem well.
That's an excellent point. It would be good if we filed a national
body comment for the ballot period to get such a thing in.
Jₑₙₛ
--
:: INRIA Nancy Grand Est ::: Camus ::::::: ICube/ICPS :::
:: :::::::::::::::::::::: gsm France : +33 651400183 ::
:: ::::::::::::::: gsm international : +49 15737185122 ::
:: http://icube-icps.unistra.fr/index.php/Jens_Gustedt ::
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
next prev parent reply other threads:[~2022-09-20 15:20 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-08 16:36 Gabriel Ravier
2022-09-12 13:59 ` Rich Felker
2022-09-12 14:42 ` Jₑₙₛ Gustedt
2022-09-19 15:09 ` Rich Felker
2022-09-19 17:59 ` Szabolcs Nagy
2022-09-19 18:10 ` Rich Felker
2022-09-20 9:19 ` Jₑₙₛ Gustedt
2022-09-20 12:28 ` Rich Felker
2022-09-20 13:29 ` Jₑₙₛ Gustedt
2022-09-20 13:55 ` Rich Felker
2022-09-20 14:08 ` Jₑₙₛ Gustedt
2022-09-20 14:15 ` Rich Felker
2022-09-20 14:22 ` Jₑₙₛ Gustedt
2022-09-20 14:27 ` Jₑₙₛ Gustedt
2022-09-20 14:46 ` Rich Felker
2022-09-20 15:20 ` Jₑₙₛ Gustedt [this message]
2023-04-15 12:28 ` [musl] [PATCH v2 0/1] " Gabriel Ravier
2023-04-15 12:28 ` [musl] [PATCH v2 1/1] " Gabriel Ravier
2023-04-15 12:52 ` Jₑₙₛ Gustedt
2023-04-15 13:15 ` Gabriel Ravier
2023-04-15 14:15 ` Jₑₙₛ Gustedt
2023-04-16 6:51 ` Jₑₙₛ Gustedt
2023-04-16 13:20 ` Gabriel Ravier
2023-04-16 14:39 ` Rich Felker
2024-08-27 23:12 ` [musl] [PATCH v3 0/1] vfprintf: support C23 b and B " Gabriel Ravier
2024-08-27 23:12 ` [musl] [PATCH v3 1/1] " Gabriel Ravier
2022-09-08 16:38 [musl] [PATCH] vfprintf: support C2x %b and %B " Gabriel Ravier
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=20220920172011.755587cd@inria.fr \
--to=jens.gustedt@inria.fr \
--cc=dalias@libc.org \
--cc=musl@lists.openwall.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.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).