pabuhr@water.waterloo.edu (pabuhr) (10/05/87)
Can anyone explain why I get the compilation error. Is it my fail?
#include <stream.h>
class s {
public:
inline operator int(); // conversion to int(char)
friend istream& operator>>(istream &, s &); // output
}; // s
enum eee { A, B, C };
eee f( s );
main() {
s inputline;
eee ft;
cin >> inputline;
ft = f( inputline );
}
=========
cd /u/pabuhr/sm/string/
ccc -c bug.cc
ccc bug.cc:
"bug.cc", line 18: error: ambiguous operand types eee (s ) and s for function call
1 error
Compilation exited abnormally with code 1 at Mon Oct 5 15:34:33
===========
#line 1 "bug.cc"
/* <<cfront 1.2.1 2/16/87>> */
/* < bug.cc */
char *_new(); char _delete(); char *_vec_new(); char _vec_delete();
#line 1 "/usr/lib/ccc/incl/stream.h"
..... <=== deleted the stream.h stuff
#line 3 "bug.cc"
struct s { /* sizeof s == 1 */
char _dummy; };
#line 6 "bug.cc"
extern struct istream *_rshiftFRCistream__RCs___ ();
#line 9 "bug.cc"
/* enum eee */
#line 11 "bug.cc"
int f ();
/* the end */