This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 115e. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2024-11-11


1949. “sequenced after” instead of “sequenced before”

Section: 6.9.1  [intro.execution]     Status: CD4     Submitter: Richard Smith     Date: 2014-06-18

[Moved to DR at the October, 2015 meeting.]

The term “sequenced after” is used in both the core and library clauses instead of the more-correct “sequenced before.”

Proposed resolution (May, 2015):

  1. Change 6.9.1 [intro.execution] paragraph 13 as follows:

  2. Sequenced before is an asymmetric, transitive, pair-wise relation between evaluations executed by a single thread (6.9.2 [intro.multithread]), which induces a partial order among those evaluations. Given any two evaluations A and B, if A is sequenced before B (or, equivalently, B is sequenced after A), then the execution of A shall precede the execution of B. If A is not sequenced before B...
  3. Change 6.9.2 [intro.multithread] paragraph 14 as follows:

  4. An evaluation A happens before an evaluation B (or, equivalently, B happens after A) if:...
  5. Change 6.9.1 [intro.execution] paragraph 15 as follows:

  6. ...Every evaluation in the calling function (including other function calls) that is not otherwise specifically sequenced before or after the execution of the body of the called function is indeterminately sequenced with respect to the execution of the called function For each function invocation F, for every evaluation A that occurs within F and every evaluation B that does not occur within F but is evaluated on the same thread and as part of the same signal handler (if any), either A is sequenced before B or B is sequenced before A.9 [Note: if A and B would not otherwise be sequenced then they are indeterminately sequenced. —end note] Several contexts...
  7. Change 6.9.3.2 [basic.start.static] paragraph 4 as follows:

  8. It is implementation-defined whether the dynamic initialization of a non-local variable with static storage duration is done happens before the first statement of main. If the initialization is deferred to some point in time happen after the first statement of main, it shall occur happens before the first odr-use (6.3 [basic.def.odr]) of any function or variable...
  9. Change 6.9.3.2 [basic.start.static] paragraph 5 as follows:

  10. It is implementation-defined whether the dynamic initialization of a non-local variable with static or thread storage duration is done sequenced before the first statement of the initial function of the thread. If the initialization is deferred to some point in time sequenced after the first statement of the initial function of the thread, it shall occur is sequenced before the first odr-use (6.3 [basic.def.odr]) of any variable with thread storage duration defined in the same translation unit as the variable to be initialized.
  11. Change 8.6.4 [stmt.for] paragraph 1 as follows:

  12. ...[Note: Thus the first statement specifies initialization for the loop; the condition (8.5 [stmt.select]) specifies a test, made sequenced before each iteration, such that the loop is exited when the condition becomes false; the expression often specifies incrementing that is done sequenced after each iteration. —end note]
  13. Add the following as a new paragraph at the end of Clause 14 [except]:

  14. In this section, “before” and “after” refer to the “sequenced before” relation (6.9.1 [intro.execution]).