mailing list of musl libc
 help / color / mirror / code / Atom feed
From: "Jₑₙₛ Gustedt" <jens.gustedt@inria.fr>
To: Rich Felker <dalias@libc.org>
Cc: musl@lists.openwall.com
Subject: Re: [musl] [C23 feature tests 0/6] tests needed for C23 interfaces
Date: Wed, 24 May 2023 16:11:01 +0200	[thread overview]
Message-ID: <20230524161101.785c148f@inria.fr> (raw)
In-Reply-To: <20230524135837.GU4163@brightrain.aerifal.cx>

[-- Attachment #1: Type: text/plain, Size: 2762 bytes --]

Rich,

on Wed, 24 May 2023 09:58:37 -0400 you (Rich Felker <dalias@libc.org>)
wrote:

> On Wed, May 24, 2023 at 12:04:34PM +0200, Jens Gustedt wrote:
> > C23 has some new features, in particular attributes, that are
> > prescribed for certain headers.
> > 
> > Jens Gustedt (6):
> >   C23: provide fallbacks for the use of C attributes
> >   C23: add a feature test for the __VA_OPT__ feature
> >   C23: add a feature test for the [u]int128_t
> >   Add a feature test for the _BitInt types.
> >   add a `__inline_or_static` macro for pre-C99 compilers
> >   C23: add an internal interface for the new unsequenced attribute
> > 
> >  include/features.h | 51
> > +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 50
> > insertions(+), 1 deletion(-)
> > 
> > -- 
> > 2.34.1  
> 
> I don't see a motivation for any of the patches in this series.

sure, you don't have the usage side yet, please be patient

I decided to group them together, because they are the easiest applied
at the beginning.

> For the ones which test for compiler features, musl does not use any
> of these features internally, so it does not have any use for
> testing for their support.


> At the public header level, they're only to be used in
> things which are C23-only, and can just be used unconditionally in the
> C23-only macros that need them.

These are not macros that need them, but functions. C23 requires
changes from `_Noreturn` to `[[noreturn]]` for example, deprecates
functions and stuff like that.

> For __noreturn, we already have _Noreturn (just above your new
> definition in the patch). I'm not clear on what the motivation for
> having a new alternative to this is.

`_Noreturn` remains a keyword for C23, but the headers are required to
use the new attribute. So we have to use a new name for the interfaces
that can be mapped to the old or new feature according to the needs.

> I don't see how __inline_or_static makes sense at all. (Non-static)
> inline has very different semantics from static

sure

> and they cannot be used interchangibly as a "use whichever the
> compiler supports".

This macro is only meant to make a difference for pre-C99 compilers,
which we still seem to support.

> We do not use non-static inline at all in musl,
> and I'm not aware of any place it would be useful in the public
> headers.

This comes in later, obvious.

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 ::

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

      reply	other threads:[~2023-05-24 14:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-24 10:04 Jens Gustedt
2023-05-03  9:44 ` [musl] [C23 feature tests 1/6] C23: provide fallbacks for the use of C attributes Jens Gustedt
2023-05-03 11:26 ` [musl] [C23 feature tests 2/6] C23: add a feature test for the __VA_OPT__ feature Jens Gustedt
2023-05-03 11:40 ` [musl] [C23 feature tests 3/6] C23: add a feature test for the [u]int128_t Jens Gustedt
2023-05-09 15:27 ` [musl] [C23 feature tests 6/6] C23: add an internal interface for the new unsequenced attribute Jens Gustedt
2023-05-10 12:48 ` [musl] [C23 feature tests 5/6] add a `__inline_or_static` macro for pre-C99 compilers Jens Gustedt
2023-05-10 12:57 ` [musl] [C23 feature tests 4/6] Add a feature test for the _BitInt types Jens Gustedt
2023-05-24 13:58 ` [musl] [C23 feature tests 0/6] tests needed for C23 interfaces Rich Felker
2023-05-24 14:11   ` Jₑₙₛ Gustedt [this message]

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=20230524161101.785c148f@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).