[libc-commits] [libc] [libc] Add limits.h header. (PR #78887)

via libc-commits libc-commits at lists.llvm.org
Sun Jan 21 08:11:12 PST 2024


================
@@ -0,0 +1,229 @@
+//===-- Definition of macros from limits.h --------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef __LLVM_LIBC_MACROS_LIMITS_MACROS_H
+#define __LLVM_LIBC_MACROS_LIMITS_MACROS_H
+
+#ifdef __clang__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wgnu-include-next"
----------------
lntue wrote:

It is to hide the following warning from clang:
```
limits-macros.h:17:2: warning: #include_next is a language extension [-Wgnu-include-next]
```
There are the same warnings from gcc, but I'm still tracking the correct `-W` flag to ignore.

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


More information about the libc-commits mailing list