Commit 9b913b03 by Ian Lance Taylor Committed by Ian Lance Taylor

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
parent e90c7b84
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
......
// 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 "" }
}
......@@ -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" "" }
}
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