Incorrect alignment in MSVC compatibility mode
Open
c++11
confirmed
diverges-from:msvc
platform:windows
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
Consider the following example (https://godbolt.org/z/r5qG5vE9n):
```cpp
struct alignas(8) B;
struct B { alignas(4) int i; }; // Clang rejects, MSVC accepts
static_assert(alignof(B) == 4); // Clang rejects, MSVC accepts
```
This is accepted by MSVC (with a warning), but is reject by Clang even with an `x86_64-pc-windows-msvc` target triple.
Contributor guide
Assessment
This issue has not been assessed yet.