Date
2012-12-15.00:00:00
Message id
4198

Content

Proposed resolution (December, 2012):

Change 7.6.1.2 [expr.sub] paragraph 1 as follows:

A postfix expression followed by an expression in square brackets is a postfix expression. One of the expressions shall have the type “array of T” or “pointer to T” and the other shall have unscoped enumeration or integral type. The result is an lvalue of type “T.” The type “T” shall be a completely-defined object type.62 The expression E1[E2] is identical (by definition) to *((E1)+(E2)) [Note: see 7.6.2 [expr.unary] and 7.6.6 [expr.add] for details of * and + and 9.3.4.5 [dcl.array] for details of arrays. —end note], except that in the case of an array operand, the result is an lvalue if that operand is an lvalue and an xvalue otherwise.

(See also issue 616.)