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: 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: 14 Dec 2001 07:35:58 +0100
- Subject: Re: Volatile MEMs in statement expressions and functions inlined as trees
- Organization: CodeSourcery, LLC
- References: <Pine.LNX.email@example.com>
Linus Torvalds <firstname.lastname@example.org> writes:
| On 13 Dec 2001, Gabriel Dos Reis wrote:
| > No. It is the result of the assigment "p = 0". Now condiser the
| > second assigmemt "q = p". To perform that assignment, an
| > lvalue-to-rvalue conversion is necessariy.
| Now you're changing the rules of C++ parsing, too.
No, I was not changing C++ parsing rules.
| THERE IS NO "q = p" assignment.
See below to understand the point I was making.
| The assignment is
| q = p = 0;
| which parses as
| q = (p = 0);
There is no dispute there. The point is that the standard says the
result of (p = 0) is an lvalue. To put the discussion on a sane basis,
I'm first trying to have you undertanding the implications of the
q = p; // #1
-- which basically happens after (p = 0).
I was not changing the parsing rules. If you understand #1, then you
will understand what is happing in q = p = 0;
| So it clearly and unambiguously says that "q gets the result of the
And it also says that the result of the assignment is an lvalue and
*you* are claiming it is an rvalue. It is not me who is changing the
| That sentence which you have avoided so actively, trying to come up with
| arguments (like "q = p") which have nothing to do with the whole issue.
I didn't avoid that sentence actively. I even made the complete quote.
Please, do stick to facts.
| So how _do_ you parse that sentence?
I parse the *complete* sentence which ends with "the result is an
CodeSourcery, LLC http://www.codesourcery.com