|
Message-ID: <20230524164253.71c36d82@inria.fr>
Date: Wed, 24 May 2023 16:42:53 +0200
From: Jₑₙₛ Gustedt <jens.gustedt@...ia.fr>
To: Rich Felker <dalias@...c.org>
Cc: musl@...ts.openwall.com
Subject: Re: [C23 divers headers 16/17] C23: add the nullptr_t type
Rich,
on Wed, 24 May 2023 10:34:08 -0400 you (Rich Felker <dalias@...c.org>)
wrote:
> On Wed, May 24, 2023 at 04:29:16PM +0200, Jₑₙₛ Gustedt wrote:
> > Rich,
> >
> > on Wed, 24 May 2023 10:22:01 -0400 you (Rich Felker
> > <dalias@...c.org>) wrote:
> >
> > > nullptr_t is not defined pre-C23 so the __clang__ branch
> > > shouldn't be there.
> >
> > Well, if I do that, such a change is impossible to test, because
> > there are not yet any compilers with that version number. How
> > should we do that, then? Have a test for >= 201800L or so?
>
> I'm not really convinced this needs testing at this point (what even
> is a test testing, if not that the right version results in the
> definition being present?),
I have code that uses these things in `_Generic` to see if they do the
intended choice. (I agree that this is more testing the compiler, than
the library.)
> but what does existing -std=c2x or
> whatever set the version to?
This depends on the compiler and its version. And some of these have
`nullptr` and some don't.
> Could probably use >= that instead of >= the official C23 version.
I'll try to find a cut-off between the clang and gcc version macros.
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.