diff options
Diffstat (limited to 'gcc/c-family/c-warn.c')
-rw-r--r-- | gcc/c-family/c-warn.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/c-family/c-warn.c b/gcc/c-family/c-warn.c index 322cf98eb02..67dce9e125a 100644 --- a/gcc/c-family/c-warn.c +++ b/gcc/c-family/c-warn.c @@ -2784,6 +2784,8 @@ check_alignment_of_packed_member (tree type, tree field, bool rvalue) /* Check alignment of the data member. */ if (TREE_CODE (field) == FIELD_DECL && (DECL_PACKED (field) || TYPE_PACKED (TREE_TYPE (field))) + /* Ignore FIELDs not laid out yet. */ + && DECL_FIELD_OFFSET (field) && (!rvalue || TREE_CODE (TREE_TYPE (field)) == ARRAY_TYPE)) { /* Check the expected alignment against the field alignment. */ |