diff options
author | Chris Demetriou <cgd@broadcom.com> | 2003-06-27 22:43:38 +0000 |
---|---|---|
committer | Chris Demetriou <cgd@gcc.gnu.org> | 2003-06-27 15:43:38 -0700 |
commit | 7a0ec6071b687c061bafa7d68d17bee4377bb618 (patch) | |
tree | cdf4bb81f96c9f3513e15e4780792b82705f1b05 | |
parent | e455bc273ebd4e45e4383b9031f8c4d48a4728a8 (diff) | |
download | gcc-7a0ec6071b687c061bafa7d68d17bee4377bb618.zip gcc-7a0ec6071b687c061bafa7d68d17bee4377bb618.tar.gz gcc-7a0ec6071b687c061bafa7d68d17bee4377bb618.tar.bz2 |
mips.c (mips_build_va_list): Make padding in va_list structure explicit to avoid -Wpadded warnings.
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
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/mips/mips.c | 12 |
2 files changed, 15 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8a6872f..3f9eac5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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. diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index ef43a1a..d909e4e 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -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; |