Skip to content

Conversation

@spall
Copy link
Collaborator

@spall spall commented Nov 24, 2025

Add language about conversions to and from bit-fields.

@github-actions github-actions bot added the language-spec Issue with completed spec label Nov 24, 2025
Copy link
Member

@hekota hekota left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Collaborator

@llvm-beanz llvm-beanz left a comment

Choose a reason for hiding this comment

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

I'm not sure this is the right way to spec bit-fields. Bit-fields aren't really a type, and there aren't really conversions in and out of bitfields the way other conversions occur.

The only parts of the conversion chapter that probably need to talk about bit-fields is the integral conversions and promotions because they may be restricted based on whether or not the value fits into the bit-field's size.

I think the main language we need around bitfields is how they're represented in aggregate initialization and inside classes (although none of the classes chapter has been written yet).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

language-spec Issue with completed spec

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants