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:
parent
e90c7b8433
commit
9b913b0302
@ -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>
|
2004-01-11 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
PR middle-end/13392
|
PR middle-end/13392
|
||||||
|
15
gcc/testsuite/g++.dg/parse/error10.C
Normal file
15
gcc/testsuite/g++.dg/parse/error10.C
Normal 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 "" }
|
||||||
|
}
|
@ -10,5 +10,5 @@ template <typename T> class X {};
|
|||||||
void fn ()
|
void fn ()
|
||||||
{
|
{
|
||||||
class L {};
|
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" "" }
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user