"Potential results" contains not only id-expressions?

27 views
Skip to first unread message

Johannes Schaub

unread,
Aug 9, 2016, 2:44:51 PM8/9/16
to std-dis...@isocpp.org
The spec says at 3p2 about "potential results"

"[ Note: This set is a (possibly-empty) set of id-expressions, each of
which is either e or a subexpression of e."

However, it has one bullet in its definition that reads as

"If e is a subscripting operation ([expr.sub]) with an array operand,
the set contains that operand."

So, the following's potential results of expresion "a[0][0]" only
consists of the set "a[0]".

int a[1][1];

int y = a[0][0];

This however is not consistent with the note. It would be consistent
if the bullet said "..., the set contains the potential results of
that operand". Am I missing something here?

Richard Smith

unread,
Aug 9, 2016, 6:59:05 PM8/9/16
to std-dis...@isocpp.org
It's a wording goof. This bullet should say "the set contains <ins>the potential results of</ins> that operand" (as I hope is sufficiently clear from context and from the introductory sentence). Fixed editorially:

Reply all
Reply to author
Forward
0 new messages