Skip to content

Detail layout of repr(C) unions #160

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

Merged
merged 20 commits into from
Aug 15, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Correct sub-section title
  • Loading branch information
gnzlbg committed Jul 26, 2019
commit ccd7fb37fd21a476f9e167ba0a8aba1cfa9e3cc7
2 changes: 1 addition & 1 deletion reference/src/layout/unions.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Even if the offsets happen to be all 0, there might still be differences in the
function call ABI. If you need to pass unions by-value across an FFI boundary,
you have to use `#[repr(C)]`.

### Layout of `repr(C)` unions
### Layout of "repr C" unions

The layout of `repr(C)` unions follows the C layout scheme. Per sections
[6.5.8.5] and [6.7.2.1.16] of the C11 specification, this means that the offset
Expand Down