This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
New parser overly picky?
- From: Richard Guenther <rguenth at tat dot physik dot uni-tuebingen dot de>
- To: <gcc at gcc dot gnu dot org>
- Cc: Mark Mitchell <mark at codesourcery dot om>
- Date: Mon, 13 Jan 2003 15:06:43 +0100 (CET)
- Subject: New parser overly picky?
Hi!
The following testcase fails with the new parser (g++ (GCC) 3.4 20030113
(experimental)):
template <class A>
class foo {
foo();
template <class B>
class bar {
};
};
template <class A>
foo<A>::foo()
{
typedef typename foo<A>::bar<int> bar_t;
}
> g++ -c -Wall pclass.cpp
pclass.cpp: In constructor `foo<A>::foo()':
pclass.cpp:13: error: no type named `bar' in `class foo<A>'
pclass.cpp:13: error: expected primary-expression
pclass.cpp:13: error: expected `;'
while other versions are happy. Changing the typedef to
typedef bar<int> bar_t;
makes the parser happy again. Is this "correct"? At least the error
message is not helpful - if it is, its a access rights problem.
Should I file a gnats report?
Thanks, Richard.
--
Richard Guenther <richard.guenther@uni-tuebingen.de>
WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/