--- Comment #5 from Walter Bright <> 2010-03-04 
02:40:29 PST ---
C99 says this about ++x:

The operand of the prefix increment or decrement operator shall have qualified
or unqualified real or pointer type and shall be a modifiable lvalue.


The value of the operand of the prefix ++ operator is incremented. The result
is the new value of the operand after incrementation. The expression ++E is
equivalent to (E+=1). See the discussions of additive operators and compound
assignment for information on constraints, types, side effects, and conversions
and the effects of operations on pointers. The prefix -- operator is analogous
to the prefix ++ operator, except that the value of the operand is decremented.
An assignment expression has the value of the left operand after the
assignment, but is not an lvalue.

It is equivalent to x+=1, and therefore not an lvalue.

The C++98 spec also says that ++x is equivalent to x+=1, but says that the
result of x+=1 is an lvalue.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to