[gnu.g++.bug] MI ambiguity not detected

jjc@UUNET.UU.NET (James Clark) (06/08/89)

I think the following program should be rejected, because it's
ambiguous which foo() D should inherit.  g++ 1.35.1- accepts it.

Script started on Thu Jun  8 14:02:55 1989
jclark% cat mi.c
struct A {
  virtual void foo();
};

struct B : virtual A {
  void foo();
};

struct C : virtual A {
  void foo();
};

struct D : B, C {
};
jclark% g++ -g -v -c mi.c
g++ version 1.35.1-
 /usr/local/lib/gcc-cpp -+ -v -undef -D__GNU__ -D__GNUG__ -D__cplusplus -Dsparc -Dsun -Dunix -D__sparc__ -D__sun__ -D__unix__ mi.c /tmp/cca13090.cpp
GNU CPP version 1.35
 /usr/local/lib/gcc-cc1plus /tmp/cca13090.cpp -quiet -dumpbase mi.c -noreg -version -G -o /tmp/cca13090.s
GNU C++ version 1.35.1- (sparc) compiled by GNU C version 1.35.
 as /tmp/cca13090.s -o mi.o
jclark% exit
jclark% 
script done on Thu Jun  8 14:03:17 1989

James Clark
jjc@jclark.uucp