Thread View: gnu.g++.bug
1 messages
1 total messages
Started by Glen Ditchfield
Wed, 05 Jul 1989 18:43
incorrect "bitwise copy" warning
Author: Glen Ditchfield
Date: Wed, 05 Jul 1989 18:43
Date: Wed, 05 Jul 1989 18:43
35 lines
1585 bytes
1585 bytes
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
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