Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
No operators in #if
#2
Yes and no.
I think rule 20.8 is more appropriate here than rule 10.1.
Can you run the snippet below through your checker?
It should be compliant this way:

Code:
#define FALSE 0
#define TRUE 1

#define Condition1 TRUE
#define Condition2 TRUE

#if Condition1
#endif
#if (Condition1 == FALSE)  
#endif
#if ((Condition1 == TRUE) && (Condition2 == TRUE))
#endif
#if ((Condition1 == TRUE) || (Condition2 == TRUE))
#endif
<t></t>


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)