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]

egcs-1.1b: multiple template inheritance problem


The following program fails to compile under egcs-1.1b
(i386-pc-solaris2.6, i386-cygwin32):

  template <class FOO> class BAR {
  public:
    void func1();
  };

  class BAZ : public BAR<int>, BAR<char*> { };

  void func2(BAZ* b)
  {
    b->BAR<int>::func1();
  }

The generated error text is

  foo.cpp: In function `void func2(class BAZ *)':
  foo.cpp:10: request for member `BAR' is ambiguous
  foo.cpp:10: parse error before `>'

This compiles correctly under egcs 1.0.3 (and Visual C++).

                Chris Metcalf -- InCert Software -- 1 (617) 621 8080
                metcalf@incert.com -- http://www.incert.com/~metcalf




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