Commit 7acf7efa by Volker Reichelt Committed by Volker Reichelt

re PR c++/28853 (ICE on invalid declaration with template template parameter)

	PR c++/28853
	* typeck2.c (cxx_incomplete_type_diagnostic): Handle template
	template parameters.  Improve error message for template type
	parameters.

	* g++.dg/template/ttp21.C: New test.

From-SVN: r116464
parent 398cd199
2006-08-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 2006-08-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/28853
* typeck2.c (cxx_incomplete_type_diagnostic): Handle template
template parameters. Improve error message for template type
parameters.
PR c++/28852 PR c++/28852
* cp-tree.h (grok_op_properties): Return bool instead of void. * cp-tree.h (grok_op_properties): Return bool instead of void.
* decl.c (grokfndecl): Discard invalid operator declarations. * decl.c (grokfndecl): Discard invalid operator declarations.
......
...@@ -403,7 +403,12 @@ cxx_incomplete_type_diagnostic (tree value, tree type, int diag_type) ...@@ -403,7 +403,12 @@ cxx_incomplete_type_diagnostic (tree value, tree type, int diag_type)
break; break;
case TEMPLATE_TYPE_PARM: case TEMPLATE_TYPE_PARM:
p_msg ("invalid use of template type parameter"); p_msg ("invalid use of template type parameter %qT", type);
break;
case BOUND_TEMPLATE_TEMPLATE_PARM:
p_msg ("invalid use of template template parameter %qT",
TYPE_NAME (type));
break; break;
case TYPENAME_TYPE: case TYPENAME_TYPE:
......
2006-08-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de> 2006-08-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/28853
* g++.dg/template/ttp21.C: New test.
PR c++/28852 PR c++/28852
* g++.dg/other/operator1.C: Add error-marker. * g++.dg/other/operator1.C: Add error-marker.
* g++.dg/other/operator2.C: New test. * g++.dg/other/operator2.C: New test.
// PR c++/28853
// { dg-do compile }
template<template<int> class A>
int A<0>::i; // { dg-error "template template parameter" }
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