rjc%fuzz.cognet.ucla.edu@LANAI.CS.UCLA.EDU (Robert Collins) (08/17/89)
I think `bitwise' should be `memberwise' (at least according to my
understanding of C++ 2.0). In addition, should this warning be printed
by default, since memberwise copying is much more likely to do the right
thing than bitwise copying?
Thanks,
rob
rjc@cs.ucla.edu
Script started on Wed Aug 16 15:19:16 1989
% cat bug3.cc
class a {
int i;
public:
a(int);
a& foo(void);
};
main()
{
a i(4);
a j = i.foo();
}
% g++ -v -c bug3.cc
g++ version 1.36.0-
/usr/local/lib/gcc-cpp -+ -v -undef -D__GNU__ -D__GNUG__ -D__GNUC__ -D__cplusplus -Dvax -Dunix -D__vax__ -D__unix__ bug3.cc /tmp/cca24742.cpp
GNU CPP version 1.35.96
/usr/local/lib/gcc-cc1plus /tmp/cca24742.cpp -quiet -dumpbase bug3.cc -noreg -version -o /tmp/cca24742.s
GNU C++ version 1.36.0- (vax) compiled by GNU C version 1.35.96.
default target switches: -munix
bug3.cc: In function int main ():
bug3.cc:11: warning: bitwise copy in initialization of type `a'
gas /tmp/cca24742.s -o bug3.o
% ^D
script done on Wed Aug 16 15:19:57 1989