Skip to content

Conversation

@jonathonpenix
Copy link
Contributor

clang recently began providing predefined __INTN_C/__UINTN_C macros resulting in macro redefinition warnings in toolchain/llvm.h. This change was landed in clang in late Jan. 2025 and clang/LLVM 20 is the first official release that has this support (see the PR linked below).

Prefer the definitions provided by clang and avoid redefining these macros for clang versions 20 and later to avoid said warnings.

Link: llvm/llvm-project#123514

clang recently began providing predefined __INTN_C/__UINTN_C macros
resulting in macro redefinition warnings in toolchain/llvm.h. This
change was landed in clang in late Jan. 2025 and clang/LLVM 20 is the
first official release that has this support (see the PR linked below).

Prefer the definitions provided by clang and avoid redefining these macros
for clang versions 20 and later to avoid said warnings.

Link: llvm/llvm-project#123514

Signed-off-by: Jonathon Penix <[email protected]>
@jonathonpenix
Copy link
Contributor Author

I can't add reviewers, but @duda-patryk please also take a look if possible!

@kartben kartben merged commit e72f35b into zephyrproject-rtos:main Mar 31, 2025
26 checks passed
@jonathonpenix jonathonpenix deleted the clang_20_int_macros branch March 31, 2025 15:38
@jeremybettis
Copy link
Contributor

The first release that included these was actually 20.1. There was no 20.0, but if you built llvm from source, it could exist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants