This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]