This is the mail archive of the 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]

Prevent use of DECL_ALIGN on a FUNCTION_DECL

FUNCTION_DECLs don't have a DECL_ALIGN, the other fields in the u1
union are used; this patch makes tree-checking catch that case.

Bootstrapped & tested on powerpc-darwin8.

- Geoffrey Keating <>

===File ~/patches/gcc-nofuncdeclalign.patch=================
2007-07-03  Geoffrey Keating  <>

	* tree.h (DECL_ALIGN): Prevent use on a FUNCTION_DECL.

Index: gcc/tree.h
--- gcc/tree.h	(revision 125926)
+++ gcc/tree.h	(working copy)
@@ -2580,7 +2580,7 @@
 /* Likewise for the size in bytes.  */
 #define DECL_SIZE_UNIT(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.size_unit)
 /* Holds the alignment required for the datum, in bits.  */
-#define DECL_ALIGN(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.u1.a.align)
 /* The alignment of NODE, in bytes.  */
 /* For FIELD_DECLs, off_align holds the number of low-order bits of

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