aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-decl.c
diff options
context:
space:
mode:
authorJoseph Myers <jsm28@cam.ac.uk>2001-07-08 20:58:19 +0100
committerJoseph Myers <jsm28@gcc.gnu.org>2001-07-08 20:58:19 +0100
commitf7a4cec096b0476bbe39b44fbe3391d11f598728 (patch)
treeb1d0d98aa89bcdb8b2c6760c4251abfdd4a128c8 /gcc/c-decl.c
parentb4c25db2dfed2c3c86dc6b61c6fc7eee757c6c71 (diff)
downloadgcc-f7a4cec096b0476bbe39b44fbe3391d11f598728.zip
gcc-f7a4cec096b0476bbe39b44fbe3391d11f598728.tar.gz
gcc-f7a4cec096b0476bbe39b44fbe3391d11f598728.tar.bz2
c-common.c (decl_attributes): Only take a single attributes parameter.
* c-common.c (decl_attributes): Only take a single attributes parameter. * c-common.h (decl_attributes): Update prototype. * c-decl.c (start_decl, start_function): Only take a single attributes parameter. Update calls to decl_attributes. (finish_struct, finish_enum): Update calls to decl_attributes. (push_parm_decl): Expect unified list of attributes. Update call to decl_attributes. * c-parse.in (fndef, initdcl, notype_initdcl, nested_function, notype_nested_function, component_declarator, component_notype_declarator, label): Update calls to decl_attributes. (absdcl_maybe_attribute, parm, firstparm, myparm): Unify attribute lists that are passed to push_parm_decl. * c-tree.h (start_function, start_decl): Update prototypes. * config/sh/sh-protos.h, config/sh/sh.c (sh_pragma_insert_attributes): Only take a single attributes parameter. * config/sh/sh.h (PRAGMA_INSERT_ATTRIBUTES): Likewise. * doc/tm.texi (INSERT_ATTRIBUTES): Update. * objc/objc-act.c (define_decl, generate_objc_symtab_decl, build_module_descriptor, generate_static_references, generate_strings, build_selector_translation_table, generate_descriptor_table, generate_protocols, generate_ivars_list, generate_dispatch_table, generate_protocol_list, generate_category, generate_shared_structures, really_start_method, add_objc_decls, generate_classref_translation_entry): Update calls to start_decl and start_function. (build_tmp_function_decl, start_method_def): Unify attribute lists that are passed to push_parm_decl. cp: * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update calls to decl_attributes. testsuite: * gcc.c-torture/compile/20010701-1.c, g++.old-deja/g++.ext/attrib6.C: New tests. From-SVN: r43850
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r--gcc/c-decl.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index deb47d1..eba9ee6 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -3336,10 +3336,10 @@ groktypename_in_parm_context (typename)
grokfield and not through here. */
tree
-start_decl (declarator, declspecs, initialized, attributes, prefix_attributes)
+start_decl (declarator, declspecs, initialized, attributes)
tree declarator, declspecs;
int initialized;
- tree attributes, prefix_attributes;
+ tree attributes;
{
register tree decl = grokdeclarator (declarator, declspecs,
NORMAL, initialized);
@@ -3452,7 +3452,7 @@ start_decl (declarator, declspecs, initialized, attributes, prefix_attributes)
#endif
/* Set attributes here so if duplicate decl, will have proper attributes. */
- decl_attributes (decl, attributes, prefix_attributes);
+ decl_attributes (decl, attributes);
/* Add this decl to the current binding level.
TEM may equal DECL or it may be a previous decl of the same name. */
@@ -3716,8 +3716,7 @@ push_parm_decl (parm)
decl = grokdeclarator (TREE_VALUE (TREE_PURPOSE (parm)),
TREE_PURPOSE (TREE_PURPOSE (parm)), PARM, 0);
- decl_attributes (decl, TREE_VALUE (TREE_VALUE (parm)),
- TREE_PURPOSE (TREE_VALUE (parm)));
+ decl_attributes (decl, TREE_VALUE (parm));
#if 0
if (DECL_NAME (decl))
@@ -5345,7 +5344,7 @@ finish_struct (t, fieldlist, attributes)
TYPE_SIZE (t) = 0;
- decl_attributes (t, attributes, NULL_TREE);
+ decl_attributes (t, attributes);
/* Nameless union parm types are useful as GCC extension. */
if (! (TREE_CODE (t) == UNION_TYPE && TYPE_NAME (t) == 0) && !pedantic)
@@ -5709,7 +5708,7 @@ finish_enum (enumtype, values, attributes)
if (in_parm_level_p ())
warning ("enum defined inside parms");
- decl_attributes (enumtype, attributes, NULL_TREE);
+ decl_attributes (enumtype, attributes);
/* Calculate the maximum value of any enumerator in this type. */
@@ -5893,7 +5892,7 @@ build_enumerator (name, value)
/* Create the FUNCTION_DECL for a function definition.
- DECLSPECS, DECLARATOR, PREFIX_ATTRIBUTES and ATTRIBUTES are the parts of
+ DECLSPECS, DECLARATOR and ATTRIBUTES are the parts of
the declaration; they describe the function's name and the type it returns,
but twisted together in a fashion that parallels the syntax of C.
@@ -5905,8 +5904,8 @@ build_enumerator (name, value)
yyparse to report a parse error. */
int
-start_function (declspecs, declarator, prefix_attributes, attributes)
- tree declarator, declspecs, prefix_attributes, attributes;
+start_function (declspecs, declarator, attributes)
+ tree declarator, declspecs, attributes;
{
tree decl1, old_decl;
tree restype;
@@ -5933,7 +5932,7 @@ start_function (declspecs, declarator, prefix_attributes, attributes)
return 0;
}
- decl_attributes (decl1, prefix_attributes, attributes);
+ decl_attributes (decl1, attributes);
announce_function (decl1);