aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Taylor <dtaylor@emc.com>2003-06-09 23:00:36 +0000
committerJim Wilson <wilson@gcc.gnu.org>2003-06-09 16:00:36 -0700
commit64c2816fa14bf44175c637be9e58d65f3aa5db55 (patch)
treedc541055521e4d68c0f4dc5088d94e8492adbb48
parent1bfedcc8fbe8a76a23ab8164834a4f52b6b1ac47 (diff)
downloadgcc-64c2816fa14bf44175c637be9e58d65f3aa5db55.zip
gcc-64c2816fa14bf44175c637be9e58d65f3aa5db55.tar.gz
gcc-64c2816fa14bf44175c637be9e58d65f3aa5db55.tar.bz2
Patch from David Taylor.
* config/rs6000/rs6000.c (rs6000_build_va_list): Give the two bytes of padding in the __va_list_tag structure a name (reserved). From-SVN: r67684
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/rs6000/rs6000.c10
2 files changed, 13 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index ef0c632..57fc01b 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2003-06-19 David Taylor <dtaylor@emc.com>
+
+ * config/rs6000/rs6000.c (rs6000_build_va_list): Give the two
+ bytes of padding in the __va_list_tag structure a name (reserved).
+
2003-06-09 Jason Merrill <jason@redhat.com>
* fold-const.c (operand_equal_p): Handle ADDR_EXPR and TRUTH_NOT_EXPR.
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 1fa2ede..c9b5849 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -4180,7 +4180,7 @@ setup_incoming_varargs (cum, mode, type, pretend_size, no_rtl)
tree
rs6000_build_va_list ()
{
- tree f_gpr, f_fpr, f_ovf, f_sav, record, type_decl;
+ tree f_gpr, f_fpr, f_res, f_ovf, f_sav, record, type_decl;
/* For AIX, prefer 'char *' because that's what the system
header files like. */
@@ -4194,6 +4194,10 @@ rs6000_build_va_list ()
unsigned_char_type_node);
f_fpr = build_decl (FIELD_DECL, get_identifier ("fpr"),
unsigned_char_type_node);
+ /* Give the two bytes of padding a name, so that -Wpadded won't warn on
+ every user file. */
+ f_res = build_decl (FIELD_DECL, get_identifier ("reserved"),
+ short_unsigned_type_node);
f_ovf = build_decl (FIELD_DECL, get_identifier ("overflow_arg_area"),
ptr_type_node);
f_sav = build_decl (FIELD_DECL, get_identifier ("reg_save_area"),
@@ -4201,6 +4205,7 @@ rs6000_build_va_list ()
DECL_FIELD_CONTEXT (f_gpr) = record;
DECL_FIELD_CONTEXT (f_fpr) = record;
+ DECL_FIELD_CONTEXT (f_res) = record;
DECL_FIELD_CONTEXT (f_ovf) = record;
DECL_FIELD_CONTEXT (f_sav) = record;
@@ -4208,7 +4213,8 @@ rs6000_build_va_list ()
TYPE_NAME (record) = type_decl;
TYPE_FIELDS (record) = f_gpr;
TREE_CHAIN (f_gpr) = f_fpr;
- TREE_CHAIN (f_fpr) = f_ovf;
+ TREE_CHAIN (f_fpr) = f_res;
+ TREE_CHAIN (f_res) = f_ovf;
TREE_CHAIN (f_ovf) = f_sav;
layout_type (record);