[libc-commits] [libc] [libc] Add limits.h header. (PR #78887)
Nick Desaulniers via libc-commits
libc-commits at lists.llvm.org
Wed Jan 24 10:43:59 PST 2024
================
@@ -9,23 +9,14 @@
#ifndef LLVM_LIBC_SRC___SUPPORT_CPP_LIMITS_H
#define LLVM_LIBC_SRC___SUPPORT_CPP_LIMITS_H
+#include "include/llvm-libc-macros/limits-macros.h" // CHAR_BIT
#include "src/__support/CPP/type_traits/is_integral.h"
#include "src/__support/CPP/type_traits/is_signed.h"
#include "src/__support/macros/attributes.h" // LIBC_INLINE
-#include <limits.h> // CHAR_BIT
-
namespace LIBC_NAMESPACE {
namespace cpp {
-// Some older gcc distributions don't define these for 32 bit targets.
----------------
nickdesaulniers wrote:
Is there any information on when this was fixed, such as a specific version of GCC?
Especially since this is src/ so we don't need to support versions of GCC older than gcc-11.
I'd be curious how many of the fallbacks you could remove to satisfy the build with GCC; I suspect not all of the definitions are necessary.
https://github.com/llvm/llvm-project/pull/78887
More information about the libc-commits
mailing list