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

[dcl.dcl]/11 Storage from object definitions has proper alignment #2878

Merged
merged 1 commit into from Jun 12, 2019

Conversation

randomnetcat
Copy link
Contributor

Require implementations to reserve storage of both proper size and aligment in an object definition. Previously, this sentence requires only storage of proper size be reserved.

Additionally, specified that space is only reserved for object definitions, as it does not make sense to reserve space for a function definition.

Rationale for being editorial: if implementations are not required to reserve storage of proper alignment, accessing any variable is then possibly-UB due to lifetime failing to begin ([basic.life]/1). This is obviously not the intent of the Committee.

Copy link
Member

@jensmaurer jensmaurer left a comment

Choose a reason for hiding this comment

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

Looks good.

@zygoloid zygoloid merged commit 8845c5c into cplusplus:master Jun 12, 2019
@randomnetcat randomnetcat deleted the patch_1 branch September 25, 2019 01:40
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.

None yet

3 participants