![]() |
|
MISRA-C:2004 Rule 19.16: (Required) |
|
||||
![]() | |||||||
The requirement of this rule is that all preprocessor directives shall be syntactically valid even when they occur within an excluded block of code.
In particular, ensure that #else and #endif directives are not followed by any characters other than white-space. Compilers are not always consistent in enforcing this ISO requirement.
#define AAA 2...intfoo(void){intx=0; ...#ifndef AAAx=1;#else1/* Not compliant */x=AAA;#endif...returnx;}
QAC messages that encompass this guideline:
| 3115 | Unrecognized preprocessing directive has been ignored because of conditional inclusion directives. |
|
||
(c) The Motor Industry Research Association, 2004
|
QA C Source Code Analyser 8.1.2
MISRA-C:2004 Compliance Module 3.2 © 2013 Programming Research www.programmingresearch.com |
Personality Groups | Glossary | Message Index | MISRA-C:2004 Rule Index | Contents |