https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91423

--- Comment #3 from Anders Schau Knatten <anders at knatten dot org> ---
(In reply to Richard Biener from comment #1)
> I think GCC tells you that deriving from std::array from a packed struct is
> going to cause trouble because std::array expects to be naturally aligned?

Do you know why std::array expect to be naturally aligned? 

I checked by the way, and gcc and clang both seem to naturally align base class
subobjects. So in this case, the std::array subobject will be naturally aligned
regardless of Vec packing: https://godbolt.org/z/9ZZ3eT

In any case, if that is what it's trying to tell me, I think the warning could
be improved.

Reply via email to