/cp
2015-07-23 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/52987
* parser.c (cp_parser_simple_declaration): Robustify check avoiding
redundant error messages.
/testsuite
2015-07-23 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/52987
* g++.dg/parse/error57.C: New.
* g++.dg/expr/string-2.C: Update.
From-SVN: r226097
+2015-07-23 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/52987
+ * parser.c (cp_parser_simple_declaration): Robustify check avoiding
+ redundant error messages.
+
2015-07-21 Paolo Carlini <paolo.carlini@oracle.com>
* decl.c (grokdeclarator): For an erroneous template parameter
{
/* If we have already issued an error message we don't need
to issue another one. */
- if (decl != error_mark_node
+ if ((decl != error_mark_node
+ && DECL_INITIAL (decl) != error_mark_node)
|| cp_parser_uncommitted_to_tentative_parse_p (parser))
cp_parser_error (parser, "expected %<,%> or %<;%>");
/* Skip tokens until we reach the end of the statement. */
+2015-07-23 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/52987
+ * g++.dg/parse/error57.C: New.
+ * g++.dg/expr/string-2.C: Update.
+
2015-07-23 Richard Biener <rguenther@suse.de>
PR tree-optimization/66945
char a[1];
int foo(a = "") // { dg-error "invalid array assignment" }
-{ // { dg-error "" }
+{
return 0;
}
--- /dev/null
+// PR c++/52987
+
+int foo(x a) { // { dg-error "9:'x' was not declared in this scope" }
+}