aboutsummaryrefslogtreecommitdiff
path: root/lib/include/stdnoreturn.h
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2022-07-28 11:54:23 -0700
committerAndrew Kelley <andrew@ziglang.org>2022-07-28 11:54:23 -0700
commitd3389eadf42417deae2d9ba01f9529be861fb998 (patch)
tree2a6037fd6085762be5e99cbb390f3157c4b22b1c /lib/include/stdnoreturn.h
parentadb4a953021aadcfd539589eeccc2fe4e6ab827a (diff)
downloadzig-d3389eadf42417deae2d9ba01f9529be861fb998.tar.gz
zig-d3389eadf42417deae2d9ba01f9529be861fb998.zip
update C headers to LLVM 15
release/15.x 37007475ca1b345b4c5d340e228bcd7a62732d81
Diffstat (limited to 'lib/include/stdnoreturn.h')
-rw-r--r--lib/include/stdnoreturn.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/include/stdnoreturn.h b/lib/include/stdnoreturn.h
index e83cd81537..7d19fa7b2f 100644
--- a/lib/include/stdnoreturn.h
+++ b/lib/include/stdnoreturn.h
@@ -13,4 +13,17 @@
#define noreturn _Noreturn
#define __noreturn_is_defined 1
+#if __STDC_VERSION__ > 201710L && \
+ !defined(_CLANG_DISABLE_CRT_DEPRECATION_WARNINGS)
+/* The noreturn macro is deprecated in C2x. We do not mark it as such because
+ including the header file in C2x is also deprecated and we do not want to
+ issue a confusing diagnostic for code which includes <stdnoreturn.h>
+ followed by code that writes [[noreturn]]. The issue with such code is not
+ with the attribute, or the use of 'noreturn', but the inclusion of the
+ header. */
+/* FIXME: We should be issuing a deprecation warning here, but cannot yet due
+ * to system headers which include this header file unconditionally.
+ */
+#endif
+
#endif /* __STDNORETURN_H */