🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by James Clark Thu, 08 Jun 1989 15:29
MI ambiguity not detected
#54
Author: 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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads