Problem with virtual base class in gcc-2.95.2
Alexander Zvyagin
zvyagin@gams.ihep.su
Mon Dec 27 06:39:00 GMT 1999
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.
More information about the Gcc-bugs
mailing list