[previous] 0827 [next] [S] Missing ':' after '?' in a '#if' or '#elif' expression.
Syntax errors

The expression in this #if or #elif directive is badly formed. A '?' has been encountered without a following ':'. For example:


/*PRQA S 0553 ++*/

#define A 1
#define B 2

#if (A ? 0 : B)        /* OK                         */
extern int e1;
#endif

#if ( A ? B )          /* Message 0827 and also 0897 */
extern int e1;
#endif


No MISRA-C:2004 Rules applicable to message 0827


See also:

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