Commit 35f10998 by Jakub Jelinek Committed by Jakub Jelinek

encoding.c (objc_layout_structure_next_member): Do the whole procedure even for…

encoding.c (objc_layout_structure_next_member): Do the whole procedure even for the first member, so that we get correct alignment.

	* encoding.c (objc_layout_structure_next_member): Do the whole
	procedure even for the first member, so that we get correct
	alignment.

From-SVN: r33110
parent 5591ee6f
...@@ -6,6 +6,10 @@ ...@@ -6,6 +6,10 @@
* encoding.c (objc_layout_finish_structure): Don't use * encoding.c (objc_layout_finish_structure): Don't use
ROUND_TYPE_ALIGN on sparc. ROUND_TYPE_ALIGN on sparc.
* encoding.c (objc_layout_structure_next_member): Do the whole
procedure even for the first member, so that we get correct
alignment.
2000-03-29 Zack Weinberg <zack@wolery.cumb.org> 2000-03-29 Zack Weinberg <zack@wolery.cumb.org>
* objc/Protocol.h, objc/objc-list.h: Change #endif labels to * objc/Protocol.h, objc/objc-list.h: Change #endif labels to
......
...@@ -743,15 +743,6 @@ objc_layout_structure_next_member (struct objc_struct_layout *layout) ...@@ -743,15 +743,6 @@ objc_layout_structure_next_member (struct objc_struct_layout *layout)
/* The current type without the type qualifiers */ /* The current type without the type qualifiers */
const char *type; const char *type;
#if 1
if (layout->prev_type == NULL)
{
layout->prev_type = layout->type;
layout->type = objc_skip_typespec (layout->prev_type);
return YES;
}
#endif
/* Add the size of the previous field to the size of the record. */ /* Add the size of the previous field to the size of the record. */
if (layout->prev_type) if (layout->prev_type)
{ {
...@@ -760,7 +751,6 @@ objc_layout_structure_next_member (struct objc_struct_layout *layout) ...@@ -760,7 +751,6 @@ objc_layout_structure_next_member (struct objc_struct_layout *layout)
if (*type != _C_BFLD) if (*type != _C_BFLD)
layout->record_size += objc_sizeof_type (type) * BITS_PER_UNIT; layout->record_size += objc_sizeof_type (type) * BITS_PER_UNIT;
else { else {
desired_align = 1;
/* Get the bitfield's type */ /* Get the bitfield's type */
for (bfld_type = type + 1; for (bfld_type = type + 1;
isdigit(*bfld_type); isdigit(*bfld_type);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment