re PR c++/3478 (Accepts invalid "enum typename")

PR c++/3478
	* g++.dg/parse/error10.C: New test.
	* g++.dg/template/arg2.C: Accept "invalid type" error.

From-SVN: r75689
This commit is contained in:
Ian Lance Taylor 2004-01-11 20:33:56 +00:00 committed by Ian Lance Taylor
parent e90c7b8433
commit 9b913b0302
3 changed files with 22 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
PR c++/3478
* g++.dg/parse/error10.C: New test.
* g++.dg/template/arg2.C: Accept "invalid type" error.
2004-01-11 Jakub Jelinek <jakub@redhat.com>
PR middle-end/13392

View File

@ -0,0 +1,15 @@
// PR c++/3478
// { dg-options "" }
template <typename> struct A
{
enum E {};
};
template <typename T> void foo()
{
enum A<void>::E e1;
typename A<T>::E e2;
enum A<T>::E e3;
enum typename A<T>::E e4; // { dg-error "" }
}

View File

@ -10,5 +10,5 @@ template <typename T> class X {};
void fn ()
{
class L {};
X<L> f; // { dg-error "uses local type|trying to instantiate|no type" "" }
X<L> f; // { dg-error "uses local type|trying to instantiate|no type|invalid type" "" }
}