public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: John Scott <jscott@posteo.net>
To: Newlib <newlib@sourceware.org>
Subject: Re: C11/POSIX-2024 Questions
Date: Fri, 28 Jun 2024 16:00:31 +0000	[thread overview]
Message-ID: <29ba97ebf170a033471b5a3cb27d9afe0e138c38.camel@posteo.net> (raw)
In-Reply-To: <CAF9ehCVyevWK5GaGrPAz713rnpZnXFHaXedcu=0eAu-98RbsLg@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 1506 bytes --]

> I only have the final draft for POSIX-2024. It says "_POSIX_VERSION to the value 20yymmL." It isn't on the web yet for the HTML version. Anyone know the value this has in the final version?
I assume you're referring to Draft 4.1, which indeed just has the placeholder. I don't have the final version, but the latest "interim build draft" had 202405L. I expect that this has not changed since this corresponds to the month that it was sent out for publication.

> memmem is in string.h under the __GNU_VISIBLE guard. Does it now need to be under a __POSIX_VISIBLE > 2024mmdd and __GNU_VISIBLE?
ISO C has reserved symbols starting with "str" and "mem" in <string.h> to the implementation at least since C99, and POSIX affirms this, so technically it does not, and has never needed, a guard at all. It can be exposed even in strict ISO C conformance mode unconditionally. This extends to strlcpy, strlcat, stpcpy, and friends too.

> aligned_alloc in stdlib.h is only guarded by C > 2011. Does that need to be an || POSIX >= 2024 also?
POSIX 2024 *requires* C11/C17: if someone has _POSIX_C_SOURCE set to 202405L but __STDC_VERSION__ < 201112L, that's not a conforming build environment and it's basically an error on the part of the user. I therefore don't think this deserves special accommodation: a conditional on the ISO C version should be adequate.

Please note: I'm basically an amateur who lurks here and in the Austin Group and you should have healthy skepticism over my opinions here.

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 6270 bytes --]

  reply	other threads:[~2024-06-28 16:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-28 14:37 Joel Sherrill
2024-06-28 16:00 ` John Scott [this message]
2024-06-28 21:32 ` brian.inglis
2024-06-28 22:01   ` Joel Sherrill
2024-06-28 22:32     ` brian.inglis

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=29ba97ebf170a033471b5a3cb27d9afe0e138c38.camel@posteo.net \
    --to=jscott@posteo.net \
    --cc=newlib@sourceware.org \
    /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.
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 read-only IMAP folder(s) and NNTP newsgroup(s).