![]() |
![]() |
0636 | ![]() |
||||
![]() | |||||||
| Explicitly undefined | REFERENCE - ISO:C90-6.5.2.1 Structure and Union Specifiers - Semantics | ||||||
This struct or union has no named members. Unnamed members are permitted in structs and unions; in fact, unnamed bit-fields are often used for padding purposes. However defining a struct/union with no named members at all is not useful and results in undefined behaviour. For example:
/*PRQA S 553,2017,3131,3621 ++*/
struct STX
{
unsigned int x1;
unsigned int xba:3;
unsigned int :0;
unsigned int xbb:5;
unsigned int x2;
};
struct STY
{
unsigned int; /* Message 0660 */
unsigned int; /* Message 0660 */
unsigned int :0;
unsigned int; /* Message 0660 */
unsigned int; /* Message 0660 */
}; /* Message 0636 */
MISRA C:2012 Rules applicable to message 0636:
| Rule-1.3 (Required) | There shall be no occurrence of undefined or critical unspecified behaviour |
See also:
![]() | ||
| QA·C Source Code Analyser 8.1
MISRA C:2012 Compliance Module 1.0 © 2012 Programming Research. www.programmingresearch.com | Personality Groups | Glossary | Message Index | MISRA C:2012 Rule Index | Contents |