[PATCH] D39347: Fix __has_unique_object_representations based on rsmith's input

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 7 08:52:41 PST 2017


erichkeane added a comment.

Also, I should probably validate bitfields.  The following SHOULD?! be unique?

struct S {
unsigned a : 1;
unsigned b : 2;
unsigned c : 3;
unsigned d : 2;
};

static_assert(__has_unique_object_representations(S), "error");

But without 'd', it should not be (tail padding).


https://reviews.llvm.org/D39347





More information about the cfe-commits mailing list