Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <83b3220596a37f3580f24cd531881f8423f8ba17.1685522953.git.Jens.Gustedt@inria.fr>
Date: Wed, 31 May 2023 11:22:57 +0200
From: Jens Gustedt <Jens.Gustedt@...ia.fr>
To: musl@...ts.openwall.com
Subject: [C23 divers headers 10/17] C23: remove the contents of stdalign.h

This now has no contents because the features have been promoted to
keywords.
---
 include/stdalign.h | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/include/stdalign.h b/include/stdalign.h
index 2cc94be3..0f4f28ac 100644
--- a/include/stdalign.h
+++ b/include/stdalign.h
@@ -1,20 +1,25 @@
-#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)
+# define _Alignas(t) __attribute__((__aligned__(t)))
+# define _Alignof(t) __alignof__(t)
 #endif
 
+#if __STDC_VERSION__ < 202311L
 #define alignas _Alignas
 #define alignof _Alignof
-
 #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

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.