This is the mail archive of the gcc-patches@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: [C++ PATCH for 3.3] Fix implicit typename warning regression


On Fri, 6 Jun 2003 23:02:27 +0700 (ICT), Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> wrote:

> In GCC 3.3, we have a problem issuing warning for implicit
> typename.  It affects friend class declaration like
>
> 	friend class T::X;
>
> where 'T' is template parameter dependent.  The syntax forbids
> 'typename' keyword here so implicit typename warning should
> not apply.  However GCC 3.3 outputs a warning for such code.

Agreed.  But this is not because of the 'friend' syntax, but rather because
of the use of an elaborated-type-specifier, which implies 'typename'.  See
DR 180.

> +   template <typename U> friend struct Y::Z f(U); // { dg-warning "implicit" }

This should not give a warning, either, because of the use of 'struct'.

Jason


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