This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Another implicit typename bug
- To: Jason Merrill <jason at cygnus dot com>
- Subject: Another implicit typename bug
- From: Mark Mitchell <mark at markmitchell dot com>
- Date: Fri, 28 Aug 1998 17:03:26 -0700
- Cc: egcs-bugs at cygnus dot com
- Reply-to: mark at markmitchell dot com
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