Skip to content

Implement @offsetOf #7903

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
wants to merge 1 commit into from
Closed

Implement @offsetOf #7903

wants to merge 1 commit into from

Conversation

hvenev
Copy link

@hvenev hvenev commented Jan 28, 2021

@offsetof behaves like @byteOffsetOf, with the exception that it fails
if the field does not begin at a byte boundary, i.e. the bit offset is
a multiple of 8.

@offsetof behaves like @byteOffsetOf, with the exception that it fails
if the field does not begin at a byte boundary, i.e. the bit offset is
a multiple of 8.
@Vexu Vexu added the proposal This issue suggests modifications. If it also has the "accepted" label then it is planned. label Jan 29, 2021
@andrewrk
Copy link
Member

andrewrk commented Feb 1, 2021

For language changes, let's go through the proposal process for this first, please, then PR comes after it is accepted.

@andrewrk andrewrk closed this Feb 1, 2021
@hvenev
Copy link
Author

hvenev commented Feb 1, 2021

What's the proposal process?

@mikdusan
Copy link
Member

mikdusan commented Feb 1, 2021

just create an issue for your proposal

@hvenev
Copy link
Author

hvenev commented Feb 1, 2021

just create an issue for your proposal

Can I re-use #7794?

@SpexGuy
Copy link
Contributor

SpexGuy commented Feb 1, 2021

Yes, but for a change like this (making offsetOf fail for bit packed fields), please add motivating examples of existing code where the change would be helpful to avoid bugs or footguns, or would make the code simpler.

@SpexGuy
Copy link
Contributor

SpexGuy commented Feb 1, 2021

The process for language changes is:

  1. A proposal issue is created proposing the idea.
  2. Andrew will make a decision on it, either marking it as accepted or closing it. This sometimes takes a while, but if the issue makes a very good argument it can be fast.
  3. PRs for accepted proposals may be merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal This issue suggests modifications. If it also has the "accepted" label then it is planned.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants