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: Linus Torvalds <torvalds at transmeta dot com>
- Cc: Gabriel Dos Reis <gdr at codesourcery dot com>, <gcc-patches at gcc dot gnu dot org>
- Date: 13 Dec 2001 21:57:53 +0100
- Subject: Re: Volatile MEMs in statement expressions and functions inlined as trees
- Organization: CodeSourcery, LLC
- References: <Pine.LNX.4.33.0112131226280.1851-100000@penguin.transmeta.com>
Linus Torvalds <torvalds@transmeta.com> writes:
[...]
| That flies in the face of the C++ standard itself, which was quoted in
| this thread.
That part only says what the *result* of the assignment is. But it is
*irrelevant* to say what the assignment operator expects the right
operand to be. There lies our disagreement.
[...]
| - made-up-rule #2: lvalue->rvalue conversion is a dereference
|
| This "rule" is _also_ not supported by any standard I have ever
4.1/2
The value contained in the object indicated by the lvalue is the
rvalue result. When an lvalue-to-rvalue con-version occurs within
the operand of sizeof (5.3.3) the value contained in the referenced
object is not accessed, since that operator does not evaluate its
operand.
-- Gaby