This is the mail archive of the gcc-bugs@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]

Another implicit typename bug



Jason --

  Here's a rather nasty implicit typename bug, which I checked in as
g++.pt/typename13.C. 

----------------------------------------------------------------------
// Build don't link:
// Special g++ Options:
// excess errors test - XFAIL *-*-*

template <class T>
struct B 
{
  typedef int I;
};


template <class T>
struct D : public B<T>
{
  void f();
};


template <class T>
void D<T>::f()
{
  I();
}


template <>
struct B<int> 
{
  void I();
};


int main()
{
  D<int> di;
  di.f();
}
-------------------------------------------------------------------------

  I suspect that if the typename is implicit, and we don't find the
type, we should convert the CAST_EXPR to a CALL_EXPR.

-- 
Mark Mitchell 			mark@markmitchell.com
Mark Mitchell Consulting	http://www.markmitchell.com



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