![]() |
|
Message-ID: <3lnqw5j5fkymova6gnoez7rpsvt2najjax52pmqwx5mtwwtz6h@q6cwbmzmspas>
Date: Sat, 5 Jul 2025 04:28:47 +0200
From: Alejandro Colomar <alx@...nel.org>
To: Eric Blake <eblake@...hat.com>
Cc: Rich Felker <dalias@...c.org>, enh <enh@...gle.com>,
Florian Weimer <fweimer@...hat.com>, Adhemerval Zanella Netto <adhemerval.zanella@...aro.org>,
musl@...ts.openwall.com, libc-alpha@...rceware.org, Joseph Myers <josmyers@...hat.com>,
наб <nabijaczleweli@...ijaczleweli.xyz>, Paul Eggert <eggert@...ucla.edu>,
Robert Seacord <rcseacord@...il.com>, Bruno Haible <bruno@...sp.org>, bug-gnulib@....org,
JeanHeyd Meneide <phdofthehouse@...il.com>, Thorsten Glaser <tg@...bsd.de>
Subject: Re: Re: BUG: realloc(p,0) should be consistent with malloc(0)
Hi Eric,
On Sat, Jul 05, 2025 at 01:31:38AM +0200, Alejandro Colomar wrote:
> > > > - POSIX.1-2001
> > >
> > > This one defers to C89 anywhere that it is not explicitly documenting
> > > with CX shading.
> >
> > Ahh, I had thought it would defer to C99 because it's older, but I guess
> > it's like POSIX.1-2024 that doesn't defer to C23. Thanks! Then I stand
> > corrected, and glibc conforms to POSIX.1-2001.
>
> I was reading the memccpy(3) specification in POSIX.1-2004, and found
> this:
>
> Issue 6
>
> The restrict keyword is added to the memccpy() prototype
> for alignment with the ISO/IEC 9899:1999 standard.
>
> So, Issue 6 aligned with ISO C99? Is this exceptional, or does then
> POSIX.1-2001 not defer to ISO C89?
POSIX.1-2004 certainly seems to be using deferring to C99, as it has the
c99(1) shell utility.
<https://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap02.html#tag_02_01_04_02>
and has several references to ISO/IEC 9899:1999.
<https://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap02.html#tag_02_02_01>
But I didn't find any to C89.
Which means, glibc didn't conform to POSIX.1-2004 (and much likely,
neither to POSIX.1-2001; but I don't have a link to that). Anyway, I
guess n3612 will solve our problems forever, hopefully. See you! :)
Cheers,
Alex
--
<https://www.alejandro-colomar.es/>
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
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.