+2004-12-02 Nathan Sidwell <nathan@codesourcery.com>
+
+ PR c++/18758
+ * parser.c (cp_parser_class_head): Return NULL_TREE when
+ push_template_decl fails. Update comment.
+
2004-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/15664, c++/18276
*NESTED_NAME_SPECIFIER_P to TRUE iff one of the productions
involving a nested-name-specifier was used, and FALSE otherwise.
+ Returns error_mark_node if this is not a class-head.
+
Returns NULL_TREE if the class-head is syntactically valid, but
semantically invalid in a way that means we should skip the entire
body of the class. */
type = TYPE_MAIN_DECL (TREE_TYPE (type));
if (PROCESSING_REAL_TEMPLATE_DECL_P ()
&& !CLASSTYPE_TEMPLATE_SPECIALIZATION (TREE_TYPE (type)))
- type = push_template_decl (type);
+ {
+ type = push_template_decl (type);
+ if (type == error_mark_node)
+ {
+ type = NULL_TREE;
+ goto done;
+ }
+ }
+
type = TREE_TYPE (type);
if (nested_name_specifier)
{
+2004-12-02 Nathan Sidwell <nathan@codesourcery.com>
+
+ PR 18758
+ * g++.dg/parse/crash21.C: New.
+
2004-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/15664, c++/18276