Skip to content

US 4-017 4.1.2p5 [intro.abstract] Designate volatile operations as observable checkpoints #591

@wg21bot

Description

@wg21bot

Describing the observable behavior of programs with undefined behavior is significantly complicated by the possibility of losing volatile operations. This distinction from C23 necessitates a new, obscure library function (std::observable_checkpoint) that is specific to the volatile case; there is moreover no evidence that it would actually change the behavior of any implementation. SG23 strongly recommended that something equivalent to the C23 rule be adopted, and EWG failed to reach consensus for that direction by the narrowest of margins.

Proposed change:

Confirm with users of volatile that there is no need for aggressive optimization (apparently beyond current techniques) of volatile operations preceding a potentially undefined operation; if so, give volatile operations the same status as library I/O functions and simplify the specification accordingly (removing observable_checkpoint in particular).

Metadata

Metadata

Assignees

No one assigned

    Labels

    EWGEvolutionSG1Concurrency

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions