gjditchfield@watmsg.waterloo.edu (Glen Ditchfield) (07/06/89)
g++ 1.35.1- complains that it must do a bitwise copy on a class with a member with an operator=(). But the class doesn't have any members at all! ----- g++-op=.c ----- class string { friend class strsub; public: strsub operator()( short p, short l); }; class strsub { friend class string; strsub( string&, short, short); public: string& operator=(string&); }; strsub string::operator()( short pos, short len) { strsub sub( *this, pos, len); return sub; }; ----- compiler messages ----- cd /u/gjditchfield/C++/Bugs/ g++ -v -c g++-op=.cc g++ version 1.35.1- /usr/local/lib/gcc-cpp -+ -v -undef -D__GNU__ -D__GNUG__ -D__cplusplus -Dvax -Dunix -D__vax__ -D__unix__ g++-op=.cc /tmp/cc011719.cpp GNU CPP version 1.35.93 /usr/local/lib/gcc-cc1plus /tmp/cc011719.cpp -quiet -dumpbase g++-op=.cc -noreg -version -o /tmp/cc011719.s GNU C++ version 1.35.1- (vax) compiled by GNU C version 1.35. In method struct strsub string::operator () (short int, short int): g++-op=.cc:16: warning: bitwise copy: `strsub' has a member with operator=() /usr/local/lib/gcc-as /tmp/cc011719.s -o g++-op=.o ... on a vax running BSD 4.3, with md -> vax.md, tm.h -> tm-vax+.h