diff options
author | Jakub Jelinek <jakub@gcc.gnu.org> | 2011-12-12 19:55:06 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2011-12-12 19:55:06 +0100 |
commit | 007db66070dd022993de34ab2c9f880b4d5678cb (patch) | |
tree | a57323d9fb21bb4b9a243709225a2a653c407055 /gcc | |
parent | fe4bf59fb63c95ee07aa8a62a4ecf0a93e8d6083 (diff) | |
download | gcc-007db66070dd022993de34ab2c9f880b4d5678cb.zip gcc-007db66070dd022993de34ab2c9f880b4d5678cb.tar.gz gcc-007db66070dd022993de34ab2c9f880b4d5678cb.tar.bz2 |
re PR c++/51496 (FAIL: libgomp.c++/for-2.C * (test for excess errors))
PR c++/51496
* parser.c (cp_parser_omp_for_loop): When determining whether
to use cp_parser_omp_for_incr or cp_parser_expression and when
calling cp_parser_omp_for_incr, use real_decl instead of decl.
From-SVN: r182257
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/cp/parser.c | 8 |
2 files changed, 12 insertions, 5 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 7db2598..3f04054 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,10 @@ +2011-12-12 Jakub Jelinek <jakub@redhat.com> + + PR c++/51496 + * parser.c (cp_parser_omp_for_loop): When determining whether + to use cp_parser_omp_for_incr or cp_parser_expression and when + calling cp_parser_omp_for_incr, use real_decl instead of decl. + 2011-12-12 Torvald Riegel <triegel@redhat.com> * semantics.c (finish_transaction_stmt, build_transaction_expr): @@ -9,7 +16,7 @@ (cp_parser_noexcept_specification_opt): ...here. Allow for parsing non-constexpr noexcept arguments. (cp_parser_transaction, cp_parser_transaction_expression): Parse - and handle noexcept-specifications. + and handle noexcept-specifications. (cp_parser_function_transaction): Adapt to finish_transaction_stmt change. * pt.c (tsubst_expr): Adapt to new noexcept parameters when diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index a0aa2a1..2bd91ec 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -26354,11 +26354,11 @@ cp_parser_omp_for_loop (cp_parser *parser, tree clauses, tree *par_clauses) { /* If decl is an iterator, preserve the operator on decl until finish_omp_for. */ - if (decl + if (real_decl && ((processing_template_decl - && !POINTER_TYPE_P (TREE_TYPE (decl))) - || CLASS_TYPE_P (TREE_TYPE (decl)))) - incr = cp_parser_omp_for_incr (parser, decl); + && !POINTER_TYPE_P (TREE_TYPE (real_decl))) + || CLASS_TYPE_P (TREE_TYPE (real_decl)))) + incr = cp_parser_omp_for_incr (parser, real_decl); else incr = cp_parser_expression (parser, false, NULL); } |