[previous] 1307 [next] Unnamed 'struct' and 'union' types may cause portability problems when moving to C++.
C++ compatibility

An unnamed struct or union has been defined.

There are restrictions on how such a type can be used within the C++ language.

For example:


/*PRQA S 553,750,2213,2216,3205,3602 ++*/

typedef struct { int a; int b; } TS;            /* Message 1307 */
typedef union  { int a; int b; } TU;            /* Message 1307 */
typedef enum   { A = 1, B = 2  } TE;            /*              */


No MISRA C:2012 Rules applicable to message 1307


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