2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
+ * spew.c (yyerror): Cope if yylval.ttype is NULL.
+
+2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
+
* decl.c (grokdeclarator): Diagnose undefined template contexts.
2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
|| last_token == CPP_INT
|| last_token == CPP_FLOAT)
error ("%s before numeric constant", string);
- else if (last_token == CPP_NAME
- && TREE_CODE (yylval.ttype) == IDENTIFIER_NODE)
- error ("%s before \"%s\"", string, IDENTIFIER_POINTER (yylval.ttype));
+ else if (last_token == CPP_NAME)
+ {
+ if (yylval.ttype && TREE_CODE (yylval.ttype) == IDENTIFIER_NODE)
+ error ("%s before `%s'", string, IDENTIFIER_POINTER (yylval.ttype));
+ else
+ error ("%s before `%c'", string, yychar);
+ }
else
- error ("%s before '%s' token", string, NAME(last_token));
+ error ("%s before `%s' token", string, NAME (last_token));
}
2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
+ * g++.old-deja/g++.other/parse2.C: New test.
+
+2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
+
* g++.old-deja/g++.pt/incomplete1.C: New test.
2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
--- /dev/null
+// Build don't link:
+
+// Copyright (C) 2000 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 24 Nov 2000 <nathan@codesourcery.com>
+
+// Bug 531: We ICEd trying to give a parse error.
+
+struct X
+{
+ bool operator (const X &) const; // ERROR - parse error
+};