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

Support degenerate bitfields with fields of length 32 and 64 #1613

Merged
merged 2 commits into from
Oct 5, 2013

Conversation

maskAllElse = ((1uL << len) - 1u) << offset,
signBitCheck = 1uL << (len - 1),
extendSign = ~((cast(MasksType)1u << len) - 1);
enum ulong
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why remove the MasksType ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

MasksType served no purpose, the true "mask type" gets determined by myToString function depending on the value of the mask.
Removing MasksType and using ulong for those masks removed unnecessary complexity.

@monarchdodra
Copy link
Collaborator

Well, LGTM. Anybody see any outstanding issues?

dnadlinger added a commit that referenced this pull request Oct 5, 2013
Support degenerate bitfields with fields of length 32 and 64
@dnadlinger dnadlinger merged commit 6a02ef3 into dlang:master Oct 5, 2013
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.

3 participants