09-06-2017, 09:47 AM
Rule 2.5 Is #undef considered a “use†of a macro�
For example
CODE: SELECT ALL
#define M1 This
#define M2 That
#undef M1
use( M2 );
Is 'M1' unused and therefore violate rule 2.5, or does the #undef count as a use of M1?
using #undef is a violation for Rule 20.5. #undef used is not appreciated for MISRA C 2012. so, For me, #undef count can not be recognized as a use of M1? the above code should is a violation for rule 2.5.
For example
CODE: SELECT ALL
#define M1 This
#define M2 That
#undef M1
use( M2 );
Is 'M1' unused and therefore violate rule 2.5, or does the #undef count as a use of M1?
using #undef is a violation for Rule 20.5. #undef used is not appreciated for MISRA C 2012. so, For me, #undef count can not be recognized as a use of M1? the above code should is a violation for rule 2.5.
<t></t>