This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Another picky-new-parser problem
- From: Richard Guenther <rguenth at tat dot physik dot uni-tuebingen dot de>
- To: <gcc at gcc dot gnu dot org>
- Cc: <mark at codesourcery dot com>
- Date: Mon, 13 Jan 2003 15:18:21 +0100 (CET)
- Subject: Another picky-new-parser problem
The following testcase fails with the new parser while it succeeds
with other compilers:
template<class T, class U>
struct UnaryReturn {
typedef T Type_t;
};
struct foo
{
template <class T>
typename UnaryReturn<T, int>::Type_t
bar();
};
template<class T>
struct UnaryReturn<T, int> {
typedef bool Type_t;
};
> g++ -c -Wall insbefdecl.cpp
insbefdecl.cpp:14: error: specialization of `UnaryReturn<T, int>' after
instantiation
Moving the specialization before struct foo fixes the problem.
Should I file a gnats report on this?
Thanks, Richard.
--
Richard Guenther <richard.guenther@uni-tuebingen.de>
WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/