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

cmake,make: add clang atomic-implicit-seq-cst warning #453

Merged
merged 1 commit into from
Jul 24, 2022

Conversation

sreimers
Copy link
Member

@sreimers sreimers commented Jul 21, 2022

Atomic operations should always be explicit.

  • C11 default is sequentially-consistent memory ordering (performance overhead on some systems like ARM)
  • Some expressions like x = x + 1 (atomic read followed by atomic write), are not atomic (easy to make mistakes)
  • C99 and MVSC has to be explicit

@sreimers sreimers force-pushed the atomic-implicit-seq-cst branch from 02f4356 to 8e1ba5f Compare July 21, 2022 15:04
@sreimers sreimers added this to the v2.6.0 milestone Jul 21, 2022
@sreimers sreimers merged commit da89068 into main Jul 24, 2022
@sreimers sreimers deleted the atomic-implicit-seq-cst branch July 24, 2022 07:38
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.

1 participant