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
This commit is contained in:
Volker Reichelt 2006-08-26 00:37:48 +00:00 committed by Volker Reichelt
parent 398cd19904
commit 7acf7efa89
4 changed files with 19 additions and 1 deletions

View File

@ -1,5 +1,10 @@
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
* cp-tree.h (grok_op_properties): Return bool instead of void.
* decl.c (grokfndecl): Discard invalid operator declarations.

View File

@ -403,7 +403,12 @@ cxx_incomplete_type_diagnostic (tree value, tree type, int diag_type)
break;
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;
case TYPENAME_TYPE:

View File

@ -1,5 +1,8 @@
2006-08-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/28853
* g++.dg/template/ttp21.C: New test.
PR c++/28852
* g++.dg/other/operator1.C: Add error-marker.
* g++.dg/other/operator2.C: New test.

View File

@ -0,0 +1,5 @@
// PR c++/28853
// { dg-do compile }
template<template<int> class A>
int A<0>::i; // { dg-error "template template parameter" }