Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[intro.races] Clarify conflicts for the case where no bits are changed #7332

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

Eisenwave
Copy link
Contributor

Fixes #6551.

source/expressions.tex Outdated Show resolved Hide resolved
@Eisenwave Eisenwave changed the title [expr.ass] Clarify that assignment always modifies [intro.races] Clarify conflicts for the case where no bits are changed Oct 21, 2024
@Eisenwave
Copy link
Contributor Author

The new approach is now to

  • add a cross-reference to [defns.access], and
  • add a note which clarifies in [intro.races] that lack of bit changes does not absolve a modification from conflicting with another.

It is sufficiently clear that [expr.ass] always performs a modification, but due to the nature of the term "modify", it is not obvious that a modification that doesn't actually modify any bits can cause a data race.

source/basic.tex Outdated Show resolved Hide resolved
source/basic.tex Outdated Show resolved Hide resolved
Copy link
Member

@jwakely jwakely left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a Core wording or concurrency wording expert, but I like this.

@tkoeppe tkoeppe merged commit e70d9d6 into cplusplus:main Oct 23, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[intro.races] It is slightly unclear whether a data race can occur if no bits are changed
5 participants