Title
Possible flaw in wording for multiple accesses to object between sequence points
Status
cd2
Section
Clause [7] [expr]
Submitter
Jason Merrill

Created on 2003-10-29.00:00:00 last changed 179 months ago

Messages

Date: 2009-07-15.00:00:00

Note (July, 2009):

This issue was resolved by the adoption of the “sequenced before” wording.

Date: 2004-03-15.00:00:00

Notes from the March 2004 meeting:

Clark Nelson mentions that the C committee may have done something on this.

Date: 2020-12-15.00:00:00

Lisa Lippincott mentioned this case to me:

  A[0] = 0;
  A[A[0]] = 1;

This seems to use the old value of A[0] other than to calculate the new value, which is said to be undefined, but it also seems reasonable, since the old value is used in order to select the object to modify, so there's no ordering ambiguity.

Steve Adamczyk: the ordering rule referred to is in Clause 7 [expr] paragraph 4.

History
Date User Action Args
2010-03-29 00:00:00adminsetstatus: wp -> cd2
2009-08-03 00:00:00adminsetmessages: + msg2271
2009-08-03 00:00:00adminsetstatus: open -> wp
2004-04-09 00:00:00adminsetmessages: + msg985
2003-10-29 00:00:00admincreate