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

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I think the implementation of is_corresponding_member heavily depends on
layout-compatibility ensuring the same sizes and alignments of the members,
otherwise
any comparison of the OFFSET_TYPE values (which just hold at runtime byte
offset from the start of struct and at compile time hold also the type of the
pointed non-static data member and type of the object the offset is relative
to) is going to be a nighmare.  So I think we first need a clarification of the
standard for the various alignas cases or the [[no_unique_address]] cases that
are shown e.g. in the #c1 testcase and only when we can count on the
corresponding members to have the exact same offset we can move further on.

Reply via email to