[previous] 3621 [next] A bit-field is being defined as a member of a struct or union.
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;



No MISRA-C:2004 Rules applicable to message 3621


QA·C Source Code Analyser 8.1
MISRA-C:2004 Compliance Module 3.2
© 2012 Programming Research.
www.programmingresearch.com
Personality Groups | Glossary | Message Index | MISRA-C:2004 Rule Index Contents