* config/alpha/alpha.c (alpha_build_builtin_va_list): Add dummy
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 5 Dec 2003 19:13:04 +0000 (19:13 +0000)
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 5 Dec 2003 19:13:04 +0000 (19:13 +0000)
        field to suppress -Wpadded warnings.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@74342 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/alpha/alpha.c

index e94d2dc..9d91798 100644 (file)
@@ -1,4 +1,10 @@
+2003-12-05  Richard Henderson  <rth@redhat.com>
+
+       * config/alpha/alpha.c (alpha_build_builtin_va_list): Add dummy
+       field to suppress -Wpadded warnings.
+
 2003-12-05  Stuart Hastings  <stuart@apple.com>
+
        * config/rs6000/rs6000.md: Correct macro test of TARGET_MACHO.
 
 2003-12-05  Stuart Menefy <stuart.menefy@st.com>
index c540d5a..525ae3e 100644 (file)
@@ -6083,7 +6083,7 @@ function_value (tree valtype, tree func ATTRIBUTE_UNUSED,
 static tree
 alpha_build_builtin_va_list (void)
 {
-  tree base, ofs, record, type_decl;
+  tree base, ofs, space, record, type_decl;
 
   if (TARGET_ABI_OPEN_VMS || TARGET_ABI_UNICOSMK)
     return ptr_type_node;
@@ -6095,9 +6095,16 @@ alpha_build_builtin_va_list (void)
 
   /* C++? SET_IS_AGGR_TYPE (record, 1); */
 
+  /* Dummy field to prevent alignment warnings.  */
+  space = build_decl (FIELD_DECL, NULL_TREE, integer_type_node);
+  DECL_FIELD_CONTEXT (space) = record;
+  DECL_ARTIFICIAL (space) = 1;
+  DECL_IGNORED_P (space) = 1;
+
   ofs = build_decl (FIELD_DECL, get_identifier ("__offset"),
                    integer_type_node);
   DECL_FIELD_CONTEXT (ofs) = record;
+  TREE_CHAIN (ofs) = space;
 
   base = build_decl (FIELD_DECL, get_identifier ("__base"),
                     ptr_type_node);