This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: field alignment reorg PATCH


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."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]