zahirtezcan-bugs wrote:

i don't know where to ask this but is there a direct link to the Microsoft ABI 
document? The behavior i observed on MSVC was keeping same type in an alignment 
window while filling all bits of a type, but clang gives this warning even if 
that is satisfied.

For example this is compatible between MSVC and clang
```cpp
struct Foo
{
    uint64_t x: 44;
    uint64_t y: 20;
    //struct alignment is 8 bytes, we filled all uint64_t bits so moving to 
another type should not be a problem
    uint32_t s; 20;
    uint32_t s; 12;
    //we filled 32 bits of uint32_t but alignment window is not filled so we 
should still continue with uint32_t
    uint32_t a; ;13;
    uint32_t b ;3;
    uint32_t c; ;13;
    uint32_t d ;3;
};
```

https://github.com/llvm/llvm-project/pull/155770
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to