diff options
Diffstat (limited to 'gcc/cp/parser.c')
-rw-r--r-- | gcc/cp/parser.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 327ad0b..b641e08 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -590,13 +590,13 @@ cp_lexer_new_main (void) lexer = cp_lexer_alloc (); /* Put the first token in the buffer. */ - VEC_quick_push (cp_token, lexer->buffer, &token); + VEC_quick_push (cp_token, lexer->buffer, token); /* Get the remaining tokens from the preprocessor. */ while (token.type != CPP_EOF) { cp_lexer_get_preprocessor_token (lexer, &token); - VEC_safe_push (cp_token, gc, lexer->buffer, &token); + VEC_safe_push (cp_token, gc, lexer->buffer, token); } lexer->last_token = VEC_address (cp_token, lexer->buffer) @@ -1731,11 +1731,8 @@ cp_parser_context_new (cp_parser_context* next) static void push_unparsed_function_queues (cp_parser *parser) { - VEC_safe_push (cp_unparsed_functions_entry, gc, - parser->unparsed_queues, NULL); - unparsed_funs_with_default_args = NULL; - unparsed_funs_with_definitions = make_tree_vector (); - unparsed_nsdmis = NULL; + cp_unparsed_functions_entry e = {NULL, make_tree_vector (), NULL}; + VEC_safe_push (cp_unparsed_functions_entry, gc, parser->unparsed_queues, e); } static void @@ -8028,7 +8025,7 @@ start_lambda_scope (tree decl) decl = current_function_decl; ti.t = lambda_scope; ti.i = lambda_count; - VEC_safe_push (tree_int, gc, lambda_scope_stack, &ti); + VEC_safe_push (tree_int, gc, lambda_scope_stack, ti); if (lambda_scope != decl) { /* Don't reset the count if we're still in the same function. */ @@ -21758,11 +21755,9 @@ cp_parser_save_default_args (cp_parser* parser, tree decl) probe = TREE_CHAIN (probe)) if (TREE_PURPOSE (probe)) { - cp_default_arg_entry *entry - = VEC_safe_push (cp_default_arg_entry, gc, - unparsed_funs_with_default_args, NULL); - entry->class_type = current_class_type; - entry->decl = decl; + cp_default_arg_entry entry = {current_class_type, decl}; + VEC_safe_push (cp_default_arg_entry, gc, + unparsed_funs_with_default_args, entry); break; } } |