[previous] MISRA C:2012  Rule-19.2:  (Advisory) [next] The union keyword should not be used

Example Code:


#include "misra.h"
#include "m3cmex.h"

typedef union {char x[2]; uint16_t s;} TU;      /* 0750 */

union test
{                                               /* 0750 */
   char    *c;
   int32_t  i;
};

extern int16_t rule_1902( void )
{
   union test mytest;                           /* 0759 */
   TU         xtr;                              /* 0759 */

   return 0;
}


QAC messages that encompass this guideline:

0750 A union type specifier has been defined.
0759 An object of union type has been defined.



(c) The Motor Industry Research Association, 2012
QA C Source Code Analyser 8.1.2
MISRA C:2012 Compliance Module 1.0
© 2013 Programming Research
www.programmingresearch.com
Personality Groups | Glossary | Message Index | MISRA C:2012 Rule Index Contents