From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.7 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 21046 invoked from network); 24 May 2023 14:26:06 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 24 May 2023 14:26:06 -0000 Received: (qmail 27704 invoked by uid 550); 24 May 2023 14:26:03 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 27659 invoked from network); 24 May 2023 14:26:02 -0000 Date: Wed, 24 May 2023 10:25:49 -0400 From: Rich Felker To: Jens Gustedt Cc: musl@lists.openwall.com Message-ID: <20230524142549.GY4163@brightrain.aerifal.cx> References: <6a5b7e8c3df0d7a22928b598d331ae4b5385607c.1684932861.git.Jens.Gustedt@inria.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6a5b7e8c3df0d7a22928b598d331ae4b5385607c.1684932861.git.Jens.Gustedt@inria.fr> User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [musl] [C23 divers headers 10/17] C23: remove the contents of stdalign.h On Wed, Apr 19, 2023 at 01:48:23PM +0200, Jens Gustedt wrote: > This now has no contents because the features have been promoted to > keywords. > --- > include/stdalign.h | 18 +++++++++--------- > 1 file changed, 9 insertions(+), 9 deletions(-) > > diff --git a/include/stdalign.h b/include/stdalign.h > index 2cc94be3..477ae69c 100644 > --- a/include/stdalign.h > +++ b/include/stdalign.h > @@ -1,20 +1,20 @@ > -#ifndef _STDALIGN_H > -#define _STDALIGN_H > +#ifndef __STDC_VERSION_STDALIGN_H__ > +#define __STDC_VERSION_STDALIGN_H__ 202311L > > #ifndef __cplusplus > > /* this whole header only works in C11 or with compiler extensions */ > #if __STDC_VERSION__ < 201112L && defined( __GNUC__) > -#define _Alignas(t) __attribute__((__aligned__(t))) > -#define _Alignof(t) __alignof__(t) > -#endif > - > -#define alignas _Alignas > -#define alignof _Alignof > - > +# define _Alignas(t) __attribute__((__aligned__(t))) > +# define _Alignof(t) __alignof__(t) > #endif > > +/* Starting with C23 this header has no contents because these are keywords. */ > +#if __STDC_VERSION__ < 202311L > #define __alignas_is_defined 1 > #define __alignof_is_defined 1 > +#endif > + > +#endif > > #endif > -- > 2.34.1 This needs to be conditional on C version. The existing logic should not be removed but should be skipped for C23. While we will only support strict namespace conformance for latest C (and for subtle behavioral things), we don't gratuitously drop support for old versions of the standard completely like this. Rich