MISRA Discussion Forums

Full Version: Shall Rule 21.1 apply to the both paths of conditional preprocessing
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi there,
Rule 21.1 doesn't mention anything about preprocessing, so given the following code
Code:
#define ABC 345

#ifdef ABC
#define _XYZ 0xFFFFFFFF    //defect1
#else
#define _XYZ 0xF0000000  //defect2
#endif

shall we report both the above defects or only the one(defec1) in the true path?

thanks