This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Volatile MEMs in statement expressions and functions inlined as trees
- From: Gabriel Dos Reis <gdr at codesourcery dot com>
- To: Alexandre Oliva <aoliva at redhat dot com>
- Cc: Linus Torvalds <torvalds at transmeta dot com>, Gabriel Dos Reis <gdr at codesourcery dot com>, Richard Henderson <rth at redhat dot com>, <gcc-patches at gcc dot gnu dot org>
- Date: 15 Dec 2001 14:25:18 +0100
- Subject: Re: Volatile MEMs in statement expressions and functions inlined as trees
- Organization: CodeSourcery, LLC
- References: <Pine.LNX.4.33.0112141317200.3283-100000@penguin.transmeta.com> <orn10l1ip1.fsf@free.redhat.lsd.ic.unicamp.br>
Linus Torvalds <torvalds@transmeta.com> writes:
[...]
| > So I think (and this time I'm _positive_ that Gabriel will agree) that the
| > C++ assignment rules only cover the _standard_ assignments, not the ones
| > you come up with yourself by overloading the operator.
If by "standard assignments" you understand *also* the implicitly
generated copy and assignment operator, then I agree.
Alexandre Oliva <aoliva@redhat.com> writes:
| > PS. I don't know whether there is an "Obfuscated C++" competition or not,
| > but if there is, overloading of operators should be banned
|
| Then you pretty much can't use iostreams, vectors, valarrays and many
| other standard components of the C++ library. Like it or not,
| operator overloading is used a lot in the standard language, and for
| good, IMO.
I'm wondering if a C++ program with no overloaded operator is still a
C++ program ;-)
-- Gaby