aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-parser.c
diff options
context:
space:
mode:
authorRoger Sayle <roger@eyesopen.com>2005-04-21 21:31:40 +0000
committerRoger Sayle <sayle@gcc.gnu.org>2005-04-21 21:31:40 +0000
commitdbb743654f3b7d96ba40b9683feed4cb20e4435d (patch)
treed315e995a7b40e667b44d79bab6a3168904d425a /gcc/c-parser.c
parent915167f5a5a8f8f5a4107b7fa7df7fe5aae66365 (diff)
downloadgcc-dbb743654f3b7d96ba40b9683feed4cb20e4435d.zip
gcc-dbb743654f3b7d96ba40b9683feed4cb20e4435d.tar.gz
gcc-dbb743654f3b7d96ba40b9683feed4cb20e4435d.tar.bz2
c-common.h (objc_build_method_signature): Update prototype.
* c-common.h (objc_build_method_signature): Update prototype. * stub-objc.c (objc_build_method_signature): Update the stub implementation to accept and ignore additional parameter. * c-parser.c (c_parser_objc_method_decl): Reorgnize to pass the value of ellipsis to objc_build_method_signature instead of setting TREE_OVERFLOW on the parms TREE_LIST node. * objc-act.h (METHOD_ADD_ARGS_ELLIPSIS_P): New macro for accessing this field of an objc method decl. * objc-act.c (build_method_decl): Take an additional "ellipsis" argument, and set METHOD_ADD_ARGS_ELLIPSIS_P as appropriate. (objc_build_method_signature): Accept additional "ellipsis" argument and pass it to build_method_decl. (get_arg_type_list, start_method_def, gen_method_decl): Use the new METHOD_ADD_ARGS_ELLIPSIS_P instead of examining the TREE_OVERFLOW field of a TREE_LIST node. From-SVN: r98528
Diffstat (limited to 'gcc/c-parser.c')
-rw-r--r--gcc/c-parser.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/gcc/c-parser.c b/gcc/c-parser.c
index 6f96661..0a336c6 100644
--- a/gcc/c-parser.c
+++ b/gcc/c-parser.c
@@ -5790,6 +5790,8 @@ c_parser_objc_method_decl (c_parser *parser)
tree type = NULL_TREE;
tree sel;
tree parms = NULL_TREE;
+ bool ellipsis = false;
+
if (c_parser_next_token_is (parser, CPP_OPEN_PAREN))
{
c_parser_consume_token (parser);
@@ -5804,7 +5806,6 @@ c_parser_objc_method_decl (c_parser *parser)
{
tree tsel = sel;
tree list = NULL_TREE;
- bool ellipsis;
while (true)
{
tree atype = NULL_TREE, id, keyworddecl;
@@ -5834,7 +5835,6 @@ c_parser_objc_method_decl (c_parser *parser)
method parameters follow the C syntax, and may include '...'
to denote a variable number of arguments. */
parms = make_node (TREE_LIST);
- ellipsis = false;
while (c_parser_next_token_is (parser, CPP_COMMA))
{
struct c_parm *parm;
@@ -5851,10 +5851,9 @@ c_parser_objc_method_decl (c_parser *parser)
parms = chainon (parms,
build_tree_list (NULL_TREE, grokparm (parm)));
}
- TREE_OVERFLOW (parms) = ellipsis;
sel = list;
}
- return objc_build_method_signature (type, sel, parms);
+ return objc_build_method_signature (type, sel, parms, ellipsis);
}
/* Parse an objc-type-name.