[libc-commits] [libc] [libc] Use __attribute__((__noreturn__)) for _Noreturn in C < 11 (PR #121252)

Nick Desaulniers via libc-commits libc-commits at lists.llvm.org
Tue Jan 7 09:20:58 PST 2025


================
@@ -52,6 +52,16 @@
 #undef __restrict
 #define __restrict restrict // C99 and above support the restrict keyword.
 
+#undef _Noreturn
+#if __STDC_VERSION__ >= 201112L
+// In C11 and later, _Noreturn is a keyword.
----------------
nickdesaulniers wrote:

https://fosstodon.org/@llvm/113788196531306328

https://github.com/llvm/llvm-project/pull/121252


More information about the libc-commits mailing list