]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
mips.c (mips_build_va_list): Make padding in va_list structure explicit to avoid...
authorChris Demetriou <cgd@broadcom.com>
Fri, 27 Jun 2003 22:43:38 +0000 (22:43 +0000)
committerChris Demetriou <cgd@gcc.gnu.org>
Fri, 27 Jun 2003 22:43:38 +0000 (15:43 -0700)
2003-06-27  Chris Demetriou  <cgd@broadcom.com>

        * config/mips/mips.c (mips_build_va_list): Make padding in
        va_list structure explicit to avoid -Wpadded warnings.

From-SVN: r68613

gcc/ChangeLog
gcc/config/mips/mips.c

index 8a6872fc14e23a94fbc2673d8259b0b60daa5353..3f9eac5a53d8f8701206aee3e536d551002528c3 100644 (file)
@@ -1,3 +1,8 @@
+2003-06-27  Chris Demetriou  <cgd@broadcom.com>
+
+       * config/mips/mips.c (mips_build_va_list): Make padding in
+       va_list structure explicit to avoid -Wpadded warnings.
+
 2003-06-27  Ulrich Weigand  <uweigand@de.ibm.com>
 
        * config/s390/s390.h (SECONDARY_OUTPUT_RELOAD_CLASS): Define.
index ef43a1af2814d8299e00027e152df30b6c95b687..d909e4e3f97a6106f7095ea4ceb2bd59aa6c2662 100644 (file)
@@ -4273,7 +4273,8 @@ mips_build_va_list ()
 {
   if (EABI_FLOAT_VARARGS_P)
     {
-      tree f_ovfl, f_gtop, f_ftop, f_goff, f_foff, record;
+      tree f_ovfl, f_gtop, f_ftop, f_goff, f_foff, f_res, record;
+      tree array, index;
 
       record = make_node (RECORD_TYPE);
 
@@ -4287,19 +4288,26 @@ mips_build_va_list ()
                          unsigned_char_type_node);
       f_foff = build_decl (FIELD_DECL, get_identifier ("__fpr_offset"),
                          unsigned_char_type_node);
-
+      /* Explicitly pad to the size of a pointer, so that -Wpadded won't
+        warn on every user file.  */
+      index = build_int_2 (GET_MODE_SIZE (ptr_mode) - 2 - 1, 0);
+      array = build_array_type (unsigned_char_type_node,
+                               build_index_type (index));
+      f_res = build_decl (FIELD_DECL, get_identifier ("__reserved"), array);
 
       DECL_FIELD_CONTEXT (f_ovfl) = record;
       DECL_FIELD_CONTEXT (f_gtop) = record;
       DECL_FIELD_CONTEXT (f_ftop) = record;
       DECL_FIELD_CONTEXT (f_goff) = record;
       DECL_FIELD_CONTEXT (f_foff) = record;
+      DECL_FIELD_CONTEXT (f_res) = record;
 
       TYPE_FIELDS (record) = f_ovfl;
       TREE_CHAIN (f_ovfl) = f_gtop;
       TREE_CHAIN (f_gtop) = f_ftop;
       TREE_CHAIN (f_ftop) = f_goff;
       TREE_CHAIN (f_goff) = f_foff;
+      TREE_CHAIN (f_foff) = f_res;
 
       layout_type (record);
       return record;