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]

Problem with virtual base class in gcc-2.95.2


Dear GCC developers,

It seems that this code (three lines) is correct, but

class A                    { public: A(int i)     {} };
class B: public virtual A  { public: B(int i):A(i){} };
class C: public         B  { public: C(int i):B(i){} };

$ g++ -c a.c
a.c: In method `C::C(int)':
a.c:3: no matching function for call to `A::A ()'
a.c:1: candidates are: A::A(int)
a.c:1:                 A::A(const A &)

Is the code ill-formed or this is really gcc-2.95.2 bug?

With best wishes,
Alexander Zvyagin.


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