[previous] 3413 [next] Macro definition could be replaced by a typedef.
Macro Definition REFERENCE - ISO:C90-6.5.6 Type Definitions

Message 3413 is generated when a macro defines a sequence of 2 or more tokens which could be replaced by a typedef declaration.

For example:


/*PRQA S 553,2017 ++*/

#define M01 int                                 /* Message 3460 */

#define M02 unsigned int                        /* Message 3413 */
#define M03 int *                               /* Message 3413 */
#define M04 const int *                         /* Message 3413 */
#define M05 int **                              /* Message 3413 */
#define M06 volatile int * const                /* Message 3413 */


MISRA-C:2004 Rules applicable to message 3413:

Rule  19.4  (Required) C macros shall only expand to a braced initialiser, a constant, a string literal, a parenthesised expression, a type qualifier, a storage class specifier, or a do-while-zero construct.


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