This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Problem with virtual base class in gcc-2.95.2
- To: gcc-bugs at gcc dot gnu dot org
- Subject: Problem with virtual base class in gcc-2.95.2
- From: Alexander Zvyagin <zvyagin at gams dot ihep dot su>
- Date: Mon, 27 Dec 1999 17:46:55 +0300 (MSK)
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.