diff options
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/parser.c | 4 | ||||
-rw-r--r-- | gcc/cp/semantics.c | 20 |
3 files changed, 10 insertions, 19 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 1c0d9b7c121..5e769c30eec 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2013-11-22 Trevor Saunders <tsaunders@mozilla.com> + + * parser.c, semantics.c: Change some local variables from vec to + auto_vec or stack_vec. + 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com> * decl.c (reshape_init_array_1): Use tree_to_uhwi rather than diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 977adf6b791..bc86697793c 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -30345,7 +30345,7 @@ static void cp_parser_omp_declare_reduction (cp_parser *parser, cp_token *pragma_tok, enum pragma_context) { - vec<tree> types = vNULL; + auto_vec<tree> types; enum tree_code reduc_code = ERROR_MARK; tree reduc_id = NULL_TREE, orig_reduc_id = NULL_TREE, type; unsigned int i; @@ -30460,7 +30460,6 @@ cp_parser_omp_declare_reduction (cp_parser *parser, cp_token *pragma_tok, { fail: cp_parser_skip_to_pragma_eol (parser, pragma_tok); - types.release (); return; } @@ -30565,7 +30564,6 @@ cp_parser_omp_declare_reduction (cp_parser *parser, cp_token *pragma_tok, } cp_parser_require_pragma_eol (parser, pragma_tok); - types.release (); } /* OpenMP 4.0 diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index 11f781288e9..cd5a91d2c60 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -4376,24 +4376,17 @@ handle_omp_array_sections (tree c) { bool maybe_zero_len = false; unsigned int first_non_one = 0; - vec<tree> types = vNULL; + auto_vec<tree> types; tree first = handle_omp_array_sections_1 (c, OMP_CLAUSE_DECL (c), types, maybe_zero_len, first_non_one); if (first == error_mark_node) - { - types.release (); - return true; - } + return true; if (first == NULL_TREE) - { - types.release (); - return false; - } + return false; if (OMP_CLAUSE_CODE (c) == OMP_CLAUSE_DEPEND) { tree t = OMP_CLAUSE_DECL (c); tree tem = NULL_TREE; - types.release (); if (processing_template_decl) return false; /* Need to evaluate side effects in the length expressions @@ -4423,10 +4416,7 @@ handle_omp_array_sections (tree c) if (int_size_in_bytes (TREE_TYPE (first)) <= 0) maybe_zero_len = true; if (processing_template_decl && maybe_zero_len) - { - types.release (); - return false; - } + return false; for (i = num, t = OMP_CLAUSE_DECL (c); i > 0; t = TREE_CHAIN (t)) @@ -4469,7 +4459,6 @@ handle_omp_array_sections (tree c) "array section is not contiguous in %qs " "clause", omp_clause_code_name[OMP_CLAUSE_CODE (c)]); - types.release (); return true; } } @@ -4525,7 +4514,6 @@ handle_omp_array_sections (tree c) size = size_binop (MULT_EXPR, size, l); } } - types.release (); if (!processing_template_decl) { if (side_effects) |