![]() |
![]() |
3659 | ![]() |
||||
![]() | |||||||
| Arrays, structures, unions and bit-fields | REFERENCE - ISO:C90-6.5.2.1 Structure and Union Specifiers - Semantics | ||||||
An unnamed zero-width bit-field has been declared with a signed type. The declaration of an unnamed bit-field with a width of 0 indicates that no further bit-field is to be packed into the unit in which the previous bit-field, if any, was placed. It actually makes no difference whether unnamed bit-fields are of signed type or unsigned type; but message 3659 exists to enforce the arbitrary requirement that they should be unsigned. For example:
/*PRQA S 3131,3211,3408,3602,3621 ++*/
struct FSI {
unsigned int a:4;
unsigned int :0; /* */
signed int b:4;
signed int :0; /* Message 3659 */
unsigned int c:4;
} fsi;
![]() | ||
| QA·C Source Code Analyser 8.1.2
© 2013 Programming Research. www.programmingresearch.com | Personality Groups | Glossary | Message Index | Contents |