-
Notifications
You must be signed in to change notification settings - Fork 75
RULE-6-1: Permit bitfields of other integer types, depending on the compiler #318
Copy link
Copy link
Closed
Labels
Difficulty-MediumA false positive or false negative report which is expected to take 1-5 days effort to addressA false positive or false negative report which is expected to take 1-5 days effort to addressImpact-MediumPhase IIfalse positive/false negativeAn issue related to observed false positives or false negatives.An issue related to observed false positives or false negatives.user-reportIssue reported by an end user of CodeQL Coding StandardsIssue reported by an end user of CodeQL Coding Standards
Metadata
Metadata
Assignees
Labels
Difficulty-MediumA false positive or false negative report which is expected to take 1-5 days effort to addressA false positive or false negative report which is expected to take 1-5 days effort to addressImpact-MediumPhase IIfalse positive/false negativeAn issue related to observed false positives or false negatives.An issue related to observed false positives or false negatives.user-reportIssue reported by an end user of CodeQL Coding StandardsIssue reported by an end user of CodeQL Coding Standards
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
Status
Done
Affected rules
RULE-6-1Description
Support for the use of bitfields on integer types outside of
unsigned intandsigned intdepends on the implementation.gcc- permits any integer type to be use for bitfields, per https://gcc.gnu.org/onlinedocs/gcc/Structures-unions-enumerations-and-bit-fields-implementation.html.armclang- "Enumeration types, long and long long (signed and unsigned) are allowed as bitfield types." https://developer.arm.com/documentation/100067/0612/Standard-C-Implementation-Definition/Structures--unions--enumerations--and-bitfieldsclang- I believe it supports at leastlongandlong long, but I cannot find canonical documentation for that. It is alluded to elsewhere, though, e.g. https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2774.htm.qcc- no information, would need some research