This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Volatile MEMs in statement expressions and functions inlined as trees

Linus Torvalds <> 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
| _assignment_".

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

-- Gaby
CodeSourcery, LLC             

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]