![]() |
![]() |
3621 | ![]() |
||||
![]() | |||||||
| Arrays, structures, unions and bit-fields | |||||||
A bit-field is being defined as a member of a struct or union. Bit-fields should be used with care. Be aware that the way in which bit-fields are allocated in memory is implementation-defined. For example:
/*PRQA S 2017,3131,3211,3408 ++*/
struct ST
{
unsigned int a:2; /* Message 3621 */
unsigned int b:4;
unsigned int c:3;
};
struct ST stg;
![]() | ||
| QA·C Source Code Analyser 8.1.2
© 2013 Programming Research. www.programmingresearch.com | Personality Groups | Glossary | Message Index | Contents |