re PR c++/32560 (ICE on invalid declaration in template)

/cp
2007-07-11  Paolo Carlini  <pcarlini@suse.de>

	PR c++/32560
	* parser.c (cp_parser_make_indirect_declarator): When the
	the code argument is ERROR_MARK return cp_error_declarator.

/testsuite
2007-07-11  Paolo Carlini  <pcarlini@suse.de>

	PR c++/32560
	* g++.dg/template/decl3.C: New.

From-SVN: r126542
This commit is contained in:
Paolo Carlini 2007-07-11 09:18:39 +00:00 committed by Paolo Carlini
parent 0136f2f71a
commit b8ade4078e
4 changed files with 22 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2007-07-11 Paolo Carlini <pcarlini@suse.de>
PR c++/32560
* parser.c (cp_parser_make_indirect_declarator): When the
the code argument is ERROR_MARK return cp_error_declarator.
2007-07-09 Geoffrey Keating <geoffk@apple.com>
PR 32617

View File

@ -2702,6 +2702,9 @@ cp_parser_make_indirect_declarator (enum tree_code code, tree class_type,
cp_cv_quals cv_qualifiers,
cp_declarator *target)
{
if (code == ERROR_MARK)
return cp_error_declarator;
if (code == INDIRECT_REF)
if (class_type == NULL_TREE)
return make_pointer_declarator (cv_qualifiers, target);

View File

@ -1,3 +1,8 @@
2007-07-11 Paolo Carlini <pcarlini@suse.de>
PR c++/32560
* g++.dg/template/decl3.C: New.
2007-07-09 Geoffrey Keating <geoffk@apple.com>
PR 32617

View File

@ -0,0 +1,8 @@
// c++/32560
namespace N {}
template<typename> struct A
{
int A<typename N::X>; // { dg-error "namespace|argument|before" }
};