8sa1-gcc/gcc/testsuite/g++.old-deja/g++.mike/p3570.C
Jason Merrill 4495766362 fix implicit int
From-SVN: r23760
1998-11-22 18:23:45 -05:00

30 lines
426 B
C

// prms-id: 3570
extern "C" int printf(const char *, ...);
struct A {
void print() {printf("A");};
};
struct B : A {
typedef A superB;
void print() {superB::print(); printf("B");};
};
struct C : B {
typedef B superC;
void print() {superC::print(); printf("C");};
};
int main ()
{
A a;
B b;
C c;
a.print(); printf("\n");
b.print(); printf("\n");
c.print(); printf("\n");
return 0;
}