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]

Re: inner class template patch for gcc-2.95.2?


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/
----------------------------------------------------------------------

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