Commit b8ade407 by Paolo Carlini Committed by Paolo Carlini

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
parent 0136f2f7
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
......
......@@ -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);
......
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
// c++/32560
namespace N {}
template<typename> struct A
{
int A<typename N::X>; // { dg-error "namespace|argument|before" }
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment