Hidden state affects execution without appearing as an ordinary argument or stored value. For example, floating-point rounding mode is execution state that can affect a function’s result even when its explicit arguments are unchanged. section 16.3
#pragma FP_CONTRACT OFF #pragma FENV_ROUND FE_TONEAREST
These pragmas disable floating-point expression contraction and select rounding to the nearest representable number. A function using floating-point arithmetic can depend on such thread-local state. section 16.3
For an [[unsequenced]] function, hidden dependencies matter: it must not read nonconstant global variables or system state, or visibly modify them. In general, a function using floating-point arithmetic is not pure and should not have this attribute. section 16.3
Hidden state is part of a broader execution state. The abstract state also includes points of execution, intermediate values, and stored values. Effects can change hidden state, as with the lock state of an mtx_t object, the initialization state of a once_flag, or operations on an atomic_flag. section 21.0
double blub(double const* a, double* b) {
double myA = *a;
*b = 2*myA;
return *a; // May be myA or 2*myA
}
Even stored values can be difficult to track. If a and b point to the same object, writing through b changes what is read through a, despite a pointing to const. section 12.3
In multithreaded execution, the entire abstract state is generally not observable, and an overall fine-grained notion of time across threads is not assumed. Reason about relevant effects and synchronization rather than relying on a single global snapshot. section 21.0








































