Thread View: gnu.g++.bug
1 messages
1 total messages
Started by bothner
Mon, 11 Sep 1989 07:02
g++ 1.35.98 friend problem
Author: 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'
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