This is the mail archive of the
mailing list for the GCC project.
Re: Volatile MEMs in statement expressions and functions inlined as trees
- From: Linus Torvalds <torvalds at transmeta dot com>
- To: Gabriel Dos Reis <gdr at codesourcery dot com>
- Cc: Richard Henderson <rth at redhat dot com>, <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 14 Dec 2001 11:27:26 -0800 (PST)
- Subject: Re: Volatile MEMs in statement expressions and functions inlined as trees
On 14 Dec 2001, Gabriel Dos Reis wrote:
> | You do seem to want to ignore the fact that the expression
> | p = 0;
> | has a rvalue _in_and_of_itself_.
> It has an rvalue. But the *result* of the assignment is an lvalue.
But the *result* of the assignment is _also_ "the value stored".
You ignore that part.
I'm saying that BOTH are true, and I explain it by the lvalue/rvalue
> | According to you, the non-reloaded value is never even _used_, so what is
> | the point of having that "..the result is the value stored.." part at all?
> According to me, that part is meaningless. It should have been
> written "the *value of* the result ...".
Right. You are ignoring part of the standard, because you cannot make
sense of it.
You'd like to rewrite it, because you don't understand it. You think it
is inconsistent with the other part that you _do_ understand, and that you
somehow think is more important.
But I'm saying that it _is_ sensible, and the way to make it sensible is
to realize that the standard mentions "result" _three_ times, and that
they are different _parts_ of the result. I claim that the different parts
of the result are it's type, it's rvalue, and it's lvalue.
You, on the other hand, choose to say that "that part is meaningless".
Classic ostrich behaviour - ignore the parts you do not like.
Aren't you the same person who said _I_ was not quoting the full sentence?
I may not have _quoted_ it all, but at least I acknowledged the full
sentence. You, on the other hand, seem to _quote_ it, but then ignore half
of it because it doesn't fit your world-view.
And I'm telling you that your world-view is too limited. The earth is not
flat, it's round. And assignments have both a rvalue _and_ a lvalue, and
they are _both_ part of the result. You just have to know when to use