[previous] 0352 [next] Using the '#elif' preprocessing directive.
K+R compatibility REFERENCE - ISO:C90-6.8.1 Preprocessing Directives - Conditional Inclusion

#elif is being used. This preprocessing directive was not supported in old (pre ISO) compilers.

Message 0352 is only generated when the "-k+r l" option is enabled. Notice also that when this option is enabled, message 3608 is no longer generated.

For example:


/*PRQA S 2017,3122,3211,3408,3625,3674 ++*/
/*****************************
 * OPTIONS: -k+r l
 ****************************/

#define MOTOR 1

#if   MOTOR == 1
    char text[]="CHASSIS";
#elif MOTOR == 2                               /* Message 0352 */
    char text[]="ENGINE";
#else
    char text[]="LIGHTING";
#endif

See also:

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