From: Giovanni Bajo Date: Fri, 16 Jan 2004 12:33:28 +0000 (+0000) Subject: re PR c++/13407 (Confusing error message from extraneous typename) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1303d0344b83abbb12c352a47e3af6562d029a59;p=gcc.git re PR c++/13407 (Confusing error message from extraneous typename) PR c++/13407 * g++.dg/parse/typename6.C: New test. From-SVN: r75970 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 196bce820a0..3136eda9d74 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2004-01-15 Giovanni Bajo + + PR c++/13407 + * g++.dg/parse/typename6.C: New test. + 2004-01-15 Geoffrey Keating PR pch/13361 diff --git a/gcc/testsuite/g++.dg/parse/typename6.C b/gcc/testsuite/g++.dg/parse/typename6.C new file mode 100644 index 00000000000..a0f5e39b6e9 --- /dev/null +++ b/gcc/testsuite/g++.dg/parse/typename6.C @@ -0,0 +1,17 @@ +// { dg-do compile } +// Contributed by Matt Austern +// PR c++/13407: Gracefully handle keyword typename in base class specifier. + +struct A { }; +struct B { typedef A Type; }; + +template +struct X : + public typename T::Type // { dg-error "not allowed in this context" } +{ }; + +X x; + +struct C : + public typename A // { dg-error "not allowed outside of templates" } +{ };