![]() |
![]() |
0885 | ![]() |
||||
![]() | |||||||
| Explicitly undefined | REFERENCE - ISO:C90-6.8.1 Conditional Inclusion - Semantics | ||||||
The expansion of this macro includes the token 'defined' - a preprocessing operator. This is not permitted. For example:
/*PRQA S 553,2017,3211,3408,3452 ++*/
#define MAC !defined(X)
#if defined (X) /* OK */
int x;
#endif
#if (MAC) /* Message 0885 */
long x;
#endif
MISRA-C:2004 Rules applicable to message 0885:
| Rule 1.2 (Required) | No reliance shall be placed on undefined or unspecified behaviour. |
| Rule 19.14 (Required) | The defined preprocessor operator shall only be used in one of the two standard forms. |
![]() | ||
| 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 |