home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!autodesk!larsn
- From: larsn@Autodesk.COM (Lars Nyman)
- Newsgroups: comp.lang.c++
- Subject: Re: What is this CFRONT 3.0 warning message trying to tell me?
- Message-ID: <18185@autodesk.COM>
- Date: 18 Dec 92 21:21:03 GMT
- References: <1992Dec17.184841.4563@cadkey.com>
- Organization: Autodesk Inc., Sausalito CA, USA
- Lines: 26
-
- erics@cadkey.com (Eric Smith) writes:
- | In article <BzBzL2.5rx@apollo.hp.com> vinoski@ch.apollo.hp.com (Stephen Vinoski) writes:
- | | Thing &
- | | Thing::operator=(
- | | const Thing &rhs // note the addition of const here
- | | )
- | | {
- | | if (this != &rhs) {
- | | if (str != 0) {
- | | free(str);
- | | }
- | | s = strdup(rhs.str);
- | | }
- | | return *this;
- | | }
- | My reading of the ARM (section 5.9) says that this comparison is
- | undefined (or rather implementation dependent). ANSI C (actually, I'm
- | looking in the ISO document, I'm not sure if the section numbers are
- | the same) has similiar language in 6.3.8 and 6.3.9.
-
- I reach the same conclusion reading ARM...
-
- ... that this commonly suggested convention of avoiding problems w/
- assignment to "the same object" is implementation dependent (and
- thus rather useless).
-
-