gcc/cp/ChangeLog:
PR c++/18757
* parser.c (cp_parser_template_id): Don't create a CPP_TEMPLATE_ID
if parsing failed.
gcc/testsuite/ChangeLog:
* g++.dg/parse/typename5.C: Adjust for new error.
* g++.dg/parse/typename7.C: New.
From-SVN: r92554
+2004-12-23 Alexandre Oliva <aoliva@redhat.com>
+
+ PR c++/18757
+ * parser.c (cp_parser_template_id): Don't create a CPP_TEMPLATE_ID
+ if parsing failed.
+
2004-12-17 Nathan Sidwell <nathan@codesourcery.com>
PR c++/18975
the effort required to do the parse, nor will we issue duplicate
error messages about problems during instantiation of the
template. */
- if (start_of_id >= 0)
+ if (start_of_id >= 0 && !cp_parser_error_occurred (parser))
{
cp_token *token;
+2004-12-23 Alexandre Oliva <aoliva@redhat.com>
+
+ * g++.dg/parse/typename5.C: Adjust for new error.
+ * g++.dg/parse/typename7.C: New.
+
2004-12-20 Andrew Pinski <pinskia@physics.uc.edu>
PR other/19093
template <typename> struct B
{
- typedef A<typename X::Y> C; // { dg-error "declared|invalid|no type" }
+ typedef A<typename X::Y> C; // { dg-error "declared|invalid|no type|expected" }
};