We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6869425 commit ce33a48Copy full SHA for ce33a48
libc/include/__llvm-libc-common.h
@@ -50,7 +50,14 @@
50
#define __END_C_DECLS
51
52
#undef __restrict
53
-#define __restrict restrict // C99 and above support the restrict keyword.
+#if __STDC_VERSION__ >= 199901L
54
+// C99 and above support the restrict keyword.
55
+#define __restrict restrict
56
+#elif !defined(__GNUC__)
57
+// GNU-compatible compilers accept the __ spelling in all modes.
58
+// Otherwise, omit the qualifier for pure C89 compatibility.
59
+#define __restrict
60
+#endif
61
62
#undef _Noreturn
63
#if __STDC_VERSION__ >= 201112L
0 commit comments