[libc-commits] [libc] [libc] Provide `LIBC_TYPES_HAS_INT64` (PR #83441)
Guillaume Chatelet via libc-commits
libc-commits at lists.llvm.org
Fri Mar 8 01:57:09 PST 2024
================
@@ -10,14 +10,15 @@
#ifndef LLVM_LIBC_SRC___SUPPORT_MACROS_PROPERTIES_TYPES_H
#define LLVM_LIBC_SRC___SUPPORT_MACROS_PROPERTIES_TYPES_H
-#include "include/llvm-libc-macros/float-macros.h" // LDBL_MANT_DIG
-#include "include/llvm-libc-macros/stdint-macros.h" // UINT64_MAX
-#include "include/llvm-libc-types/float128.h" // float128
+#include "include/llvm-libc-macros/float-macros.h" // LDBL_MANT_DIG
+#include "include/llvm-libc-types/float128.h" // float128
#include "src/__support/macros/properties/architectures.h"
#include "src/__support/macros/properties/compiler.h"
#include "src/__support/macros/properties/cpu_features.h"
#include "src/__support/macros/properties/os.h"
+#include <stdint.h> // UINT64_MAX
----------------
gchatelet wrote:
This triggers a lot of errors like the following
```
/redacted/git/llvm-project/libc/include/llvm-libc-macros/stdint-macros.h:832:9: error: 'INTMAX_MIN' macro redefined [-Werror,-Wmacro-redefined]
#define INTMAX_MIN (-__INTMAX_MAX__ - 1)
^
/usr/lib/llvm-16/lib/clang/16/include/stdint.h:927:10: note: previous definition is here
#define INTMAX_MIN (-__INTMAX_MAX__-1)
```
I believe this is because `types.h` is quite up in the include hierarchy. We probably need to replace all `#include <stdint.h>` with `#include "include/llvm-libc-macros/stdint-macros.h"` in one shot and I'm reluctant to do this in this PR.
https://github.com/llvm/llvm-project/pull/83441
More information about the libc-commits
mailing list