🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.bug
Article #54

MI ambiguity not detected

#54
From: James Clark
Date: Thu, 08 Jun 1989 15:29
32 lines
1247 bytes
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
Technical Details
Message-ID: <8906081529.AA13147@jclark.uucp>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!UUNET.UU.NET!jclark!jjc

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!UUNET.UU.NET!jclark!jjc
From: jclark!jjc@UUNET.UU.NET (James Clark)
Newsgroups: gnu.g++.bug
Subject: MI ambiguity not detected
Message-ID: <8906081529.AA13147@jclark.uucp>
Date: 8 Jun 89 15:29:01 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 32