kill alpha va_list -Wpadded warnings
Richard Henderson
rth@twiddle.net
Fri Dec 5 19:14:00 GMT 2003
Fixes a handfull of objc tests.
r~
* config/alpha/alpha.c (alpha_build_builtin_va_list): Add dummy
field to suppress -Wpadded warnings.
Index: alpha.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/alpha/alpha.c,v
retrieving revision 1.338
diff -c -p -d -r1.338 alpha.c
*** alpha.c 5 Dec 2003 11:21:48 -0000 1.338
--- alpha.c 5 Dec 2003 19:11:12 -0000
*************** function_value (tree valtype, tree func
*** 6083,6089 ****
static tree
alpha_build_builtin_va_list (void)
{
! tree base, ofs, record, type_decl;
if (TARGET_ABI_OPEN_VMS || TARGET_ABI_UNICOSMK)
return ptr_type_node;
--- 6083,6089 ----
static tree
alpha_build_builtin_va_list (void)
{
! tree base, ofs, space, record, type_decl;
if (TARGET_ABI_OPEN_VMS || TARGET_ABI_UNICOSMK)
return ptr_type_node;
*************** alpha_build_builtin_va_list (void)
*** 6095,6103 ****
--- 6095,6110 ----
/* 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);
More information about the Gcc-patches
mailing list