Endilll wrote:

On the topic of ABI, Itanium and Microsoft type layouts are not compatible, 
even for standard-layout (POD) types. For 
[example](https://godbolt.org/z/zxfvMa9nE), bit-fields are 
[allowed](http://eel.is/c++draft/class.prop#3) in standard-layout types, but 
only Microsoft ABI mandates that bit-fields of different types can't be 
combined, and have to be padded. That's why almost all bit-fields in Clang are 
`unsigned`, without regards to types of values they hold. So author did the 
right thing asking Clang for alignment of types. 

Triviality is another aspect of what has been known as POD, and has nothing to 
do with layouts: http://eel.is/c++draft/class.prop#2

https://github.com/llvm/llvm-project/pull/67213
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to