This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Another picky-new-parser problem
- From: Richard Guenther <rguenth at tat dot physik dot uni-tuebingen dot de>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Thu, 16 Jan 2003 11:47:21 +0100 (CET)
- Subject: Re: Another picky-new-parser problem
On Mon, 13 Jan 2003, Mark Mitchell wrote:
> --On Monday, January 13, 2003 03:18:21 PM +0100 Richard Guenther
> <rguenth@tat.physik.uni-tuebingen.de> wrote:
>
> > 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
>
> This is a bug -- but not in the new parser. This is lingering fallout
> from the now-almost-gone implicit typename extension. I will use this
> as the excuse to kill the last vestiges of that ugliness.
This is now c++/9341.
Richard.
--
Richard Guenther <richard.guenther@uni-tuebingen.de>
WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/