![]() |
![]() |
0635 | ![]() |
||||
![]() | |||||||
| Language extensions | REFERENCE - ISO:C90-6.5.2.1 Structure and Union Specifiers - Semantics | ||||||
According to the ISO:C Standard, a bit-field can only be defined with one of the following types:
/*PRQA S 2211,2213,3131,3211,3408,3602,3621 ++*/
enum ET {A=0, B=1, C=2, D=3}
struct ST /* Message 0635 */
{
signed int a:3; /* OK */
unsigned int b:4; /* OK */
unsigned char c:6; /* Non-portable */
unsigned short d:5; /* Non-portable */
enum ET e:2; /* Non-portable */
} F;
MISRA-C:2004 Rules applicable to message 0635:
| Rule 1.1 (Required) | All code shall conform to ISO/IEC 9899:1990 C programming language, ISO 9899, amended and corrected by ISO/IEC 9899/COR1:1995, ISO/IEC 9899/AMD1:1995, and ISO/IEC 9899/COR2: 1996192 |
| Rule 6.4 (Required) | Bit fields shall only be defined to be of type unsigned int or signed int. |
![]() | ||
| 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 |