OSDN Git Service

* tree.h (DECL_ALIGN): Prevent use on a FUNCTION_DECL.
authorgeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 3 Jul 2007 19:13:00 +0000 (19:13 +0000)
committergeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 3 Jul 2007 19:13:00 +0000 (19:13 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126270 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/tree.h

index 816993d..f9413cd 100644 (file)
@@ -1,3 +1,7 @@
+2007-07-03  Geoffrey Keating  <geoffk@apple.com>
+
+       * tree.h (DECL_ALIGN): Prevent use on a FUNCTION_DECL.
+
 2007-07-03  Tom Tromey  <tromey@redhat.com>
 
        * c-parser.c (objc_pq_context): Removed.
index a28f20b..9845779 100644 (file)
@@ -2586,7 +2586,7 @@ struct tree_memory_partition_tag GTY(())
 /* 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)
+#define DECL_ALIGN(NODE) (TREE_NOT_CHECK (DECL_COMMON_CHECK (NODE), FUNCTION_DECL)->decl_common.u1.a.align)
 /* The alignment of NODE, in bytes.  */
 #define DECL_ALIGN_UNIT(NODE) (DECL_ALIGN (NODE) / BITS_PER_UNIT)
 /* For FIELD_DECLs, off_align holds the number of low-order bits of