Skip to content

Atomics docs should reference the C++11 standard instead of a GCC wiki page. #22064

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

Closed
mahkoh opened this issue Feb 7, 2015 · 6 comments · Fixed by #22272
Closed

Atomics docs should reference the C++11 standard instead of a GCC wiki page. #22064

mahkoh opened this issue Feb 7, 2015 · 6 comments · Fixed by #22272

Comments

@mahkoh
Copy link
Contributor

mahkoh commented Feb 7, 2015

cc @steveklabnik

@steveklabnik
Copy link
Member

Why?

@tomjakubowski
Copy link
Contributor

Some reasons include:

  • The GCC wiki's content is transient and totally out of our control. Somebody could update the wiki with wrong information and mislead Rust documentation readers.
  • The text of the C++11 standard is guaranteed to have a correct description of C++11 atomics, by definition.
  • The pertinent sections of the standard can probably be quoted directly in our docs under fair use.

@petrochenkov
Copy link
Contributor

Why 11 and not 14? With 14 our quotes will contain the latest editorial changes! :D

@steveklabnik
Copy link
Member

Are either of those standards the definitive documentation for what we are doing? I'm not opposed to this, just trying to gain some more context here.

@tomjakubowski
Copy link
Contributor

I believe so. Rust uses LLVM's atomic intrinsic functions which correspond directly to C++11's atomic operations. See the LLVM language reference and a more informal description.

If these descriptions aren’t precise enough, check [the Java and C++11] specs (see spec references in the atomics guide).

@mahkoh
Copy link
Contributor Author

mahkoh commented Feb 8, 2015

Why?

The GCC wiki is incomplete. I read it and then ten other websites that tried to provide an informal explanation of C++11 atomic operations before I looked at the standard itself and found a whole paragraph dedicated to my question.

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 a pull request may close this issue.

4 participants