This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: field alignment reorg PATCH
- From: Andreas Schwab <schwab at suse dot de>
- To: Jason Merrill <jason at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 04 Apr 2003 11:01:39 +0200
- Subject: Re: field alignment reorg PATCH
- References: <wvl7kabla2u.fsf@prospero.boston.redhat.com>
Jason Merrill <jason at redhat dot com> writes:
|> ! #ifdef PCC_BITFIELD_TYPE_MATTERS
|> ! if (PCC_BITFIELD_TYPE_MATTERS)
|> ! do_type_align (type, decl);
|> ! else
|> ! #endif
|> ! #ifdef EMPTY_FIELD_BOUNDARY
|> ! if (EMPTY_FIELD_BOUNDARY > DECL_ALIGN (decl))
|> ! {
|> ! DECL_ALIGN (decl) = EMPTY_FIELD_BOUNDARY;
|> ! DECL_USER_ALIGN (decl) = 0;
|> ! }
|> ! #endif
This gives a syntax error on ia64. Checked in as obvious.
Andreas.
2003-04-04 Andreas Schwab <schwab at suse dot de>
* stor-layout.c (layout_decl): Avoid syntax error in last change
when PCC_BITFIELD_TYPE_MATTERS is defined but not
EMPTY_FIELD_BOUNDARY.
--- gcc/stor-layout.c.~1.147.~ 2003-04-04 10:13:43.000000000 +0200
+++ gcc/stor-layout.c 2003-04-04 10:45:54.000000000 +0200
@@ -445,13 +445,15 @@ layout_decl (decl, known_align)
do_type_align (type, decl);
else
#endif
+ {
#ifdef EMPTY_FIELD_BOUNDARY
- if (EMPTY_FIELD_BOUNDARY > DECL_ALIGN (decl))
- {
- DECL_ALIGN (decl) = EMPTY_FIELD_BOUNDARY;
- DECL_USER_ALIGN (decl) = 0;
- }
+ if (EMPTY_FIELD_BOUNDARY > DECL_ALIGN (decl))
+ {
+ DECL_ALIGN (decl) = EMPTY_FIELD_BOUNDARY;
+ DECL_USER_ALIGN (decl) = 0;
+ }
#endif
+ }
}
/* See if we can use an ordinary integer mode for a bit-field.
--
Andreas Schwab, SuSE Labs, schwab at suse dot de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."