[previous] 3412 [next] Macro defines an unrecognized code-fragment.
Macro Definition

This macro definition does not appear to expand to a conventional expression or a recognised code construct.

Message 3412 is generated when a macro definition consists of multiple tokens including elements such as:

The message is not generated if the macro conforms to one of the following patterns:

For example:


/*PRQA S 553,2017,3410,3429,3435,3456 ++*/

#define M01(X) { X, X + 1 }                             /* Message 3457 - a braced initializer */
#define M02    { X, X + 1 }                             /* Message 3457 - a braced initializer */
#define M03(buf,n) { int i;                     \
                     for (i = 0; i < n; ++i) {  \
                     buf[i] = 0; } }                    /* Message 3458 - a braced code block  */
#define M04(X)       \
    do {             \
       DIS_INT ();   \
       foo(X)        \
       ENA_INT ();   \
    } while (0)                                         /* Message 3459 - a 'do-while-zero'    */


#define M05           static const                      /* Message 3461 - a storage class/qualifier sequence */


#define M99 if (!ok) printf("error=%d\n",ok);           /* Message 3412 */

See also:

QA·C Source Code Analyser 8.1.2
© 2013 Programming Research.
www.programmingresearch.com
Personality Groups | Glossary | Message Index Contents