PR c++/48046
* parser.c (cp_parser_diagnose_invalid_type_name): Commit
to tentative parse sooner.
From-SVN: r173036
+2011-04-27 Jason Merrill <jason@redhat.com>
+
+ PR c++/48046
+ * parser.c (cp_parser_diagnose_invalid_type_name): Commit
+ to tentative parse sooner.
+
2011-04-26 Jason Merrill <jason@redhat.com>
PR c++/42687
location_t location)
{
tree decl, old_scope;
+ cp_parser_commit_to_tentative_parse (parser);
/* Try to lookup the identifier. */
old_scope = parser->scope;
parser->scope = scope;
else
gcc_unreachable ();
}
- cp_parser_commit_to_tentative_parse (parser);
}
/* Check for a common situation where a type-name should be present,
+2011-04-27 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/parse/ambig6.C: New.
+
2011-04-27 Nick Clifton <nickc@redhat.com>
* gcc.dg/20020312-2.c: Add definition for RX.
--- /dev/null
+// PR c++/48046
+
+namespace N1 { typedef int T; } // { dg-error "" }
+namespace N2 { typedef float T; } // { dg-error "" }
+
+int main()
+{
+ using namespace N1;
+ using namespace N2;
+
+ static T t; // { dg-error "" }
+}