Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 6 Jun 2023 08:43:22 -0400
From: Rich Felker <dalias@...c.org>
To: Jₑₙₛ Gustedt <jens.gustedt@...ia.fr>
Cc: musl@...ts.openwall.com
Subject: Re: printf("%lc", L'\0')

On Tue, Jun 06, 2023 at 12:02:15PM +0200, Jₑₙₛ Gustedt wrote:
> Hello,
> the Austin Group has a bug at
> 
> 	https://austingroupbugs.net/view.php?id=1647
> 
> that lead to a (quite late) ballot comment for C23. It seems that musl
> is the only implementation here that plays by the book and has no
> byte of output at all for this call
> 
>      printf("%lc", L'\0');
> 
> All others seem to be more consistent with the other "c" output
> formats and print one NUL byte.
> 
> Are there any feelings if we are going to change this in the sense as
> AG proposes?

Provided the change is to be aligned between POSIX and ISO C, and that
all existing historical implementations except musl do the thing
that's proposed, I don't think I have any objection to the change.
It's a little more work and less elegant on the implementation side.

Is it really confirmed that all historical C implementations, not just
all historical POSIX ones, differ from the specification in this way?
That seems rather surprising (and amusing that nobody else bothered to
read the spec when implementing). It would be nice to make sure
they're informed and in agreement on this, if there are any others.

Rich

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.