[clang]i686-windows-gnu and i686-linux-musl static assertion failed. I guess it is a 32 bit host specific issue
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
```
/home/esoeel/toolchains_build/llvm-project/clang/include/clang/AST/TypeBase.h:2416:19: error: static assertion failed due to requirement 'sizeof (*this) <= alignof(clang::Type &) + sizeof(clang::ExtQualsTypeCommonBase)': changing bitfields changed sizeof(Type)!
2416 | static_assert(sizeof(*this) <=
| ^~~~~~~~~~~~~~~~
2417 | alignof(decltype(*this)) + sizeof(ExtQualsTypeCommonBase),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/shengdun/toolchains_build/llvm-project/clang/include/clang/AST/TypeBase.h:2416:33: note: expression evaluates to '32 <= 24'
2416 | static_assert(sizeof(*this) <=
| ~~~~~~~~~~~~~~^~
2417 | alignof(decltype(*this)) + sizeof(ExtQualsTypeCommonBase),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
@MaskRay
Contributor guide
Research direction
Start at clang/include/clang/AST/TypeBase.h:2416 and inspect the surrounding Type and ExtQualsTypeCommonBase layout, focusing on why the i686 targets produce 32 <= 24. Reproduce the assertion on the reported i686-windows-gnu and i686-linux-musl hosts; done means the affected targets build without this static assertion failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100