|
Message-ID: <20230415161550.1fb92f4e@inria.fr>
Date: Sat, 15 Apr 2023 16:15:50 +0200
From: Jₑₙₛ Gustedt <jens.gustedt@...ia.fr>
To: Gabriel Ravier <gabravier@...il.com>
Cc: musl@...ts.openwall.com
Subject: Re: [PATCH v2 1/1] vfprintf: support C2x %b and %B
conversion specifiers
Gabriel,
on Sat, 15 Apr 2023 15:15:48 +0200 you (Gabriel Ravier
<gabravier@...il.com>) wrote:
> > What is still missing then, is to add PRIxYYY macros. With the
> > latest draft
> >
> > https://open-std.org/JTC1/SC22/WG14/www/docs/n3096.pdf
> >
> > these become mandatory feature tests for this feature. I already
> > have a patch for that.
> Nice to have a patch for that too, thanks. I wasn't planning on
> adding them myself, mostly because I don't really have any tests for
> them (as opposed to the b/B conversion specifiers which I have plenty
> of tests for) and don't plan on adding any anytime soon.
As said they are now mandatory, because the `B` also changes state
from just "recommended" to "recommended optional". The git message
could also reflect that.
What I noticed after sending my mail, you are also missing to do the
same for vfwprintf which unfortunately doubles the logic, here. A
refactoring for these two functions could probably gain some kilo or
so.
> > And I will soon be starting on the similar features for `scanf` and
> > friends. There is one problem zone for that, namely that `0b`
> > prefixes are not only extensions but change semantics of existing
> > executables that would be linked against different versions of the
> > C library.
> >
> > My plan is to make the distinction deep down in `__intscan` and have
> > that internal function in two versions `__intscan_c17` and
> > `__intscan_c23`, say.
> Doesn't the same apply to strto{,u}l{,l} given the behavior change is
> caused by the corresponding change in those functions ?
Yes. I have a very generous notion of "friend" ;-)
They all use that same function __intscan underneath, so this factors
out cleanly, it seems.
Thanks
Jₑₙₛ
--
:: ICube :::::::::::::::::::::::::::::: deputy director ::
:: Université de Strasbourg :::::::::::::::::::::: ICPS ::
:: INRIA Nancy Grand Est :::::::::::::::::::::::: Camus ::
:: :::::::::::::::::::::::::::::::::::: ☎ +33 368854536 ::
:: https://icube-icps.unistra.fr/index.php/Jens_Gustedt ::
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.