[PATCH] D14980: PR18513: make gcc compatible layout for bit-fields with explicit aligned attribute

John McCall via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 30 11:33:08 PST 2015


rjmccall added a comment.

In http://reviews.llvm.org/D14980#298754, @rsmith wrote:

> GCC's behavior (`aligned` on a field specifies the alignment of the start of that field) makes a little more sense to me than Clang's behavior (the type and alignment of a field specify a flavour of storage unit, and the field goes in the next such storage unit that it fits into), but both seem defensible.


Are you saying that `aligned` on a bit-field always starts new storage on GCC?

> John, are we intentionally deviating from GCC's behaviour here?


No.  I consider this to be GCC's extension, with which we are required to be ABI-compatible.  This is just a bug.


http://reviews.llvm.org/D14980





More information about the cfe-commits mailing list