Build failure due to undefined PCC_BITFIELD_TYPE_MATTERS

Andreas Schwab schwab@suse.de
Tue Jan 7 15:42:00 GMT 2003


This fixes building the C++ compiler on targets where
PCC_BITFIELD_TYPE_MATTERS is not defined, like m68k-linux.  Committed as
obvious.

Andreas.

2003-01-07  Andreas Schwab  <schwab@suse.de>

	* class.c (layout_class_type): Don't use
	PCC_BITFIELD_TYPE_MATTERS if not defined.

--- cp/class.c.~1.509.~	2003-01-07 15:50:39.000000000 +0100
+++ cp/class.c	2003-01-07 16:33:31.000000000 +0100
@@ -1,6 +1,6 @@
 /* Functions related to building classes and their related objects.
    Copyright (C) 1987, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-   1999, 2000, 2001, 2002  Free Software Foundation, Inc.
+   1999, 2000, 2001, 2002, 2003  Free Software Foundation, Inc.
    Contributed by Michael Tiemann (tiemann@cygnus.com)
 
 This file is part of GCC.
@@ -5053,6 +5053,7 @@ layout_class_type (tree t, tree *virtual
 	      padding = size_binop (MINUS_EXPR, DECL_SIZE (field),
 				    TYPE_SIZE (integer_type));
 	    }
+#ifdef PCC_BITFIELD_TYPE_MATTERS
 	  /* An unnamed bitfield does not normally affect the
 	     alignment of the containing class on a target where
 	     PCC_BITFIELD_TYPE_MATTERS.  But, the C++ ABI does not
@@ -5064,6 +5065,7 @@ layout_class_type (tree t, tree *virtual
 	      was_unnamed_p = true;
 	      DECL_NAME (field) = make_anon_name ();
 	    }
+#endif
 	  DECL_SIZE (field) = TYPE_SIZE (integer_type);
 	  DECL_ALIGN (field) = TYPE_ALIGN (integer_type);
 	  DECL_USER_ALIGN (field) = TYPE_USER_ALIGN (integer_type);

-- 
Andreas Schwab, SuSE Labs, schwab@suse.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."



More information about the Gcc-patches mailing list