aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2015-08-06 12:33:14 -0400
committerJason Merrill <jason@gcc.gnu.org>2015-08-06 12:33:14 -0400
commit1bcc5f29a71797dea523d8750dfb75a2b36920b3 (patch)
treefab8c8d1a5b5eb16ca322e8270a95da977e26e50 /gcc/cp
parentb2074542354ae9cd2166dc3d0529edf71b9ae8e6 (diff)
downloadgcc-1bcc5f29a71797dea523d8750dfb75a2b36920b3.zip
gcc-1bcc5f29a71797dea523d8750dfb75a2b36920b3.tar.gz
gcc-1bcc5f29a71797dea523d8750dfb75a2b36920b3.tar.bz2
re PR c++/66533 ([C++14] ICE: in dependent_type_p, at cp/pt.c:21073)
PR c++/66533 * parser.c (cp_parser_primary_expression): Don't skip to the end of the statement if we're parsing tentatively. From-SVN: r226684
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/parser.c3
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index e8d45dc..946c2c2 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,9 @@
2015-08-06 Jason Merrill <jason@redhat.com>
+ PR c++/66533
+ * parser.c (cp_parser_primary_expression): Don't skip to the end
+ of the statement if we're parsing tentatively.
+
PR c++/67130
PR c++/67131
PR c++/66260
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index b978fcf..bfad608 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -4432,7 +4432,8 @@ cp_parser_primary_expression (cp_parser *parser,
parser->greater_than_is_operator_p
= saved_greater_than_is_operator_p;
/* Consume the `)'. */
- if (!cp_parser_require (parser, CPP_CLOSE_PAREN, RT_CLOSE_PAREN))
+ if (!cp_parser_require (parser, CPP_CLOSE_PAREN, RT_CLOSE_PAREN)
+ && !cp_parser_uncommitted_to_tentative_parse_p (parser))
cp_parser_skip_to_end_of_statement (parser);
return expr;