mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-08 19:20:44 +08:00
re PR c++/13407 (Confusing error message from extraneous typename)
PR c++/13407 * g++.dg/parse/typename6.C: New test. From-SVN: r75970
This commit is contained in:
parent
1ed53ef30c
commit
1303d0344b
@ -1,3 +1,8 @@
|
||||
2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
|
||||
|
||||
PR c++/13407
|
||||
* g++.dg/parse/typename6.C: New test.
|
||||
|
||||
2004-01-15 Geoffrey Keating <geoffk@apple.com>
|
||||
|
||||
PR pch/13361
|
||||
|
17
gcc/testsuite/g++.dg/parse/typename6.C
Normal file
17
gcc/testsuite/g++.dg/parse/typename6.C
Normal file
@ -0,0 +1,17 @@
|
||||
// { dg-do compile }
|
||||
// Contributed by Matt Austern <austern at apple dot com>
|
||||
// PR c++/13407: Gracefully handle keyword typename in base class specifier.
|
||||
|
||||
struct A { };
|
||||
struct B { typedef A Type; };
|
||||
|
||||
template <typename T>
|
||||
struct X :
|
||||
public typename T::Type // { dg-error "not allowed in this context" }
|
||||
{ };
|
||||
|
||||
X<B> x;
|
||||
|
||||
struct C :
|
||||
public typename A // { dg-error "not allowed outside of templates" }
|
||||
{ };
|
Loading…
x
Reference in New Issue
Block a user