re PR c++/68722 (internal compiler error: in merge_exception_specifiers, at cp/typeck2.c:2108)

/cp
2016-04-12  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/68722
	* parser.c (cp_parser_cache_defarg): When file ends in default
	argument simply return error_mark_node.

/testsuite
2016-04-12  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/68722
	* g++.dg/parse/pr68722.C: New.

From-SVN: r234909
This commit is contained in:
Paolo Carlini 2016-04-12 17:54:34 +00:00 committed by Paolo Carlini
parent 5901e56ab0
commit 2b2f52bccf
4 changed files with 21 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2016-04-12 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/68722
* parser.c (cp_parser_cache_defarg): When file ends in default
argument simply return error_mark_node.
2016-04-12 Nathan Sidwell <nathan@acm.org>
PR c++/70501

View File

@ -27472,8 +27472,7 @@ cp_parser_cache_defarg (cp_parser *parser, bool nsdmi)
case CPP_EOF:
case CPP_PRAGMA_EOL:
error_at (token->location, "file ends in default argument");
done = true;
break;
return error_mark_node;
case CPP_NAME:
case CPP_SCOPE:

View File

@ -1,3 +1,8 @@
2016-04-12 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/68722
* g++.dg/parse/pr68722.C: New.
2016-04-12 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/70596

View File

@ -0,0 +1,9 @@
// PR c++/68722
class A {
&__loc // { dg-error "" }
} class ios_base { // { dg-error "" }
A _M_ios_locale ios_base(ios_base &) template <_Traits> class basic_ios { // { dg-error "" }
basic_ios basic_ios = operator= // { dg-error "" }
// { dg-prune-output "file ends in default argument" }