Skip to content

MSVC style bitfields #3646

@expipiplus1

Description

@expipiplus1

The current bitfield implementation is consistent with how GCC/Clang does things, but as noted here and here MSVC packs in the opposite order with different behavior when the member types have different sizes.

FWIW, how to specify bit fields is not specified for C or C++

We could add an option to support this behavior. Changes would be necessary in SemanticsDeclAttributesVisitor::visitStructDecl(StructDecl* structDecl).

Implemented either as a compiler option or as an attribute on the containing struct.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions