Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <61787ab80d581f7611360d7aad0f04195198988b.1685522953.git.Jens.Gustedt@inria.fr>
Date: Wed, 31 May 2023 11:23:02 +0200
From: Jens Gustedt <Jens.Gustedt@...ia.fr>
To: musl@...ts.openwall.com
Subject: [C23 divers headers 15/17] C23: add the unreachable macro

This was not previously reserved and uses a common word, so protect
it.
---
 include/stddef.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/stddef.h b/include/stddef.h
index f25b8639..f77a1b49 100644
--- a/include/stddef.h
+++ b/include/stddef.h
@@ -24,4 +24,8 @@
 #define offsetof(type, member) ((size_t)( (char *)&(((type *)0)->member) - (char *)0 ))
 #endif
 
+#if __STDC_VERSION__ >= 202000L
+#define unreachable() __builtin_unreachable()
+#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.