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 fbcafe9 commit d620a88Copy full SHA for d620a88
libc/include/llvm-libc-macros/limits-macros.h
@@ -15,13 +15,16 @@
15
#ifdef __clang__
16
#pragma clang diagnostic push
17
#pragma clang diagnostic ignored "-Wgnu-include-next"
18
-#elif defined(__GNUC__) // gcc
19
-#if !defined _GCC_LIMITS_H_
20
-#define _GCC_LIMITS_H_
21
-#endif
+#else // gcc
22
#pragma GCC system_header
23
#endif // __clang__, __GNUC__
24
+#if defined(__GNUC__) && !defined(_GCC_LIMITS_H_)
+// The system's limits.h may, in turn, try to #include_next GCC's limits.h.
+// Define the macro _GCC_LIMITS_H_ to stop its chains of #include_next.
25
+#define _GCC_LIMITS_H_
26
+#endif
27
+
28
// Include compiler's header
29
#include_next <limits.h>
30
0 commit comments