[previous] MISRA-C:2004  Rule  2.4:  (Advisory) [next] Sections of code should not be 'commented out'.
Where it is required for sections of source code not to be compiled then this should be achieved by use of conditional compilation (e.g. #if or #ifdef constructs with a comment). Using start and end comment markers for this purpose is dangerous because C does not support nested comments, and any comments already existing in the section of code would change the effect.

Example Code:


#include "misra.h"
#include "m2cmex.h"

extern S16 test_0204( void )
{
   return 0;
}


No QAC messages cover this rule.



(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