This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: inner class template patch for gcc-2.95.2?
- To: Michael Vance <briareos at lokigames dot com>
- Subject: Re: inner class template patch for gcc-2.95.2?
- From: Paul Burchard <burchard at pobox dot com>
- Date: Thu, 28 Oct 1999 17:02:32 -0700
- CC: gcc-bugs at gcc dot gnu dot org
- References: <19991028142926.K5693@namaste.lokigames-lan.com>
Michael Vance wrote:
> http://egcs.cygnus.com/ml/gcc-bugs/1999-08/msg01222.html
>
> But this seems to cause ICEs with software the exhibits
> the template bug.
Could you be more specific -- what precise patch/change causes ICEs with
what exact test case?
The test case you originally posted (my copy shown below) compiles
without error when using recent mainline snapshots together with
Kriang's template patches. I recently posted updated versions of
Kriang's patches on the list, but they have not yet been accepted (or
even commented on).
// Build don't link:
// Subject: Inner template classes confuse gcc-2.95 and gcc-2.95.1
compiler
// From: Michael Vance <briareos@lokigames.com>
// Date: Fri, 27 Aug 1999 11:39:53 -0700
#include <list>
class NF {
class K {
public:
K( void ) { };
virtual ~K( ) { };
virtual void foo( void ) { };
};
template<class T>
class L : public std::list<T*>
{
public:
L( void ) { };
void find( void ) { };
};
class M {
public:
M( void ) { };
virtual ~M( void ) { };
virtual void bar( void ) { };
};
template<class T>
class LH : public M, public L<T>, public K {
public:
LH( void ) { };
virtual ~LH( void ) { };
};
class S : public K
{
friend NF::LH<char>;
friend NF::LH<int>;
friend NF::LH<float>;
char a;
int b;
float c;
public:
S( void ) { };
};
};
--
----------------------------------------------------------------------
Paul Burchard <burchard@pobox.com> http://www.pobox.com/~burchard/
----------------------------------------------------------------------