diff options
author | froydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-08-08 17:44:53 +0000 |
---|---|---|
committer | froydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-08-08 17:44:53 +0000 |
commit | cfbfcd0bed73597ac4d7a4411ab84d5353695d7f (patch) | |
tree | 86621b607f8bb644e7ccb61ff809d59519a940b2 /gcc/c-parser.c | |
parent | 9d61f04b037fb797ff38098a9b42aa3b6ba4e286 (diff) | |
download | gcc-cfbfcd0bed73597ac4d7a4411ab84d5353695d7f.tar.gz |
* c-tree.h (build_arg_info): Declare.
* c-decl.c (build_arg_info): Define.
(get_parm_info): Call it. Delete initialization code.
* c-parser.c (c_parser_parms_declarator): Likewise.
(c_parser_parms_list_declaractor): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@163014 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-parser.c')
-rw-r--r-- | gcc/c-parser.c | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/gcc/c-parser.c b/gcc/c-parser.c index 306d46ba65f..031c6887cad 100644 --- a/gcc/c-parser.c +++ b/gcc/c-parser.c @@ -194,7 +194,6 @@ typedef struct GTY(()) c_parser { static GTY (()) c_parser *the_parser; - /* Read in and lex a single token, storing it in *TOKEN. */ static void @@ -2672,13 +2671,8 @@ c_parser_parms_declarator (c_parser *parser, bool id_list_ok, tree attrs) } if (c_parser_next_token_is (parser, CPP_CLOSE_PAREN)) { - struct c_arg_info *ret = XOBNEW (&parser_obstack, struct c_arg_info); - ret->parms = 0; - ret->tags = 0; + struct c_arg_info *ret = build_arg_info (); ret->types = list; - ret->others = 0; - ret->pending_sizes = 0; - ret->had_vla_unspec = 0; c_parser_consume_token (parser); pop_scope (); return ret; @@ -2715,24 +2709,13 @@ c_parser_parms_list_declarator (c_parser *parser, tree attrs) declarations. */ if (c_parser_next_token_is (parser, CPP_CLOSE_PAREN)) { - struct c_arg_info *ret = XOBNEW (&parser_obstack, struct c_arg_info); - ret->parms = 0; - ret->tags = 0; - ret->types = 0; - ret->others = 0; - ret->pending_sizes = 0; - ret->had_vla_unspec = 0; + struct c_arg_info *ret = build_arg_info (); c_parser_consume_token (parser); return ret; } if (c_parser_next_token_is (parser, CPP_ELLIPSIS)) { - struct c_arg_info *ret = XOBNEW (&parser_obstack, struct c_arg_info); - ret->parms = 0; - ret->tags = 0; - ret->others = 0; - ret->pending_sizes = 0; - ret->had_vla_unspec = 0; + struct c_arg_info *ret = build_arg_info (); /* Suppress -Wold-style-definition for this case. */ ret->types = error_mark_node; error_at (c_parser_peek_token (parser)->location, |