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:
parent
398cd19904
commit
7acf7efa89
@ -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.
|
||||
|
@ -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:
|
||||
|
@ -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.
|
||||
|
5
gcc/testsuite/g++.dg/template/ttp21.C
Normal file
5
gcc/testsuite/g++.dg/template/ttp21.C
Normal 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" }
|
Loading…
Reference in New Issue
Block a user