aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-decl.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2003-03-31 15:25:11 -0500
committerJason Merrill <jason@gcc.gnu.org>2003-03-31 15:25:11 -0500
commitadff28c38d207dc3a6007b81380407de0b3def57 (patch)
tree4a8375fa12eae842753474c9b26fb22fd446774f /gcc/c-decl.c
parente66833ac07efec1f12f35de6e3694238dd8ff96f (diff)
downloadgcc-adff28c38d207dc3a6007b81380407de0b3def57.zip
gcc-adff28c38d207dc3a6007b81380407de0b3def57.tar.gz
gcc-adff28c38d207dc3a6007b81380407de0b3def57.tar.bz2
re PR java/10145 (java and c++ disagree about class layout)
PR java/10145 * stor-layout.c (update_alignment_for_field): Respect DECL_USER_ALIGN for zero-length bitfields, too. * c-decl.c (finish_struct): Don't set DECL_ALIGN for normal fields. * cp/class.c (check_field_decl): Don't set DECL_ALIGN. From-SVN: r65103
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r--gcc/c-decl.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index d52823b..c9dd711 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -5257,18 +5257,6 @@ finish_struct (t, fieldlist, attributes)
}
}
- else if (TREE_TYPE (x) != error_mark_node)
- {
- unsigned int min_align = (DECL_PACKED (x) ? BITS_PER_UNIT
- : TYPE_ALIGN (TREE_TYPE (x)));
-
- /* Non-bit-fields are aligned for their type, except packed
- fields which require only BITS_PER_UNIT alignment. */
- DECL_ALIGN (x) = MAX (DECL_ALIGN (x), min_align);
- if (! DECL_PACKED (x))
- DECL_USER_ALIGN (x) |= TYPE_USER_ALIGN (TREE_TYPE (x));
- }
-
DECL_INITIAL (x) = 0;
/* Detect flexible array member in an invalid context. */