Article View: gnu.g++.bug
Article #408g++ 1.35.98 friend problem
From: bothner
Date: Mon, 11 Sep 1989 07:02
Date: Mon, 11 Sep 1989 07:02
33 lines
1938 bytes
1938 bytes
The following example is simplified from ET++.
It compiles under g++ 1.35.0, and CC 1.2 (at least under vax/ultrix),
but not under g++ 1.36.0- (at least not on sony/news).
--Per
class Class {
public:
Class(class Class*);
friend char *ClassDeclFileName (char *p= "Class.h") { return p; }
friend char *ClassDeclCompDir (char *p= "" ) { return p; }
Class(char *dn, char *dcd );
};
typedef char *string;
class StringAssoc {
public:
friend char *StringAssocDeclFileName (char *p= "AssocArray.h") { return p; }
friend char *StringAssocDeclCompDir (char *p= "" ) { return p; }
StringAssoc& operator[] (string s);
};
static Class StringAssocClassMetaImpl0 (StringAssocDeclFileName (), StringAssocDeclCompDir () );
log:
g++ version 1.35.1-
/usr/local/lib/gcc-cpp -+ -v -undef -D__GNU__ -D__GNUG__ -D__cplusplus -Dunix -Dbsd43 -Dsony -Dsony_news -Dmc68020 -Dnews800 -D__unix__ -D__bsd43__ -D__sony__ -D__sony_news__ -D__mc68020__ -D__news800__ -D__HAVE_68881__ assoc.C /tmp/cc009630.cpp
GNU CPP version 1.35.98
/usr/local/lib/gcc-cc1plus /tmp/cc009630.cpp -quiet -dumpbase assoc.C -noreg -version -o /tmp/cc009630.s
GNU C++ version 1.36.0- (based on GCC 1.35.98+) (68k, MIT syntax) compiled by GNU C version 1.35.98.
default target switches: -m68020 -mc68020 -m68881 -mbitfield
assoc.C:16: call of overloaded `StringAssocDeclFileName' is ambiguous
assoc.C:16: call of overloaded `StringAssocDeclCompDir' is ambiguous
assoc.C: In function void _GLOBAL_$I$assoc_C ():
assoc.C:16: in base initialization for class `Class'
Technical Details
Message-ID:
<8909110702.AA04073@gilroy.pa.dec.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!WSL.DEC.COM!bothnerShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!WSL.DEC.COM!bothner From: bothner@WSL.DEC.COM Newsgroups: gnu.g++.bug Subject: g++ 1.35.98 friend problem Message-ID: <8909110702.AA04073@gilroy.pa.dec.com> Date: 11 Sep 89 07:02:25 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 33