Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Macros & 14.3 II
#1
Since, according to http://www.misra-c2.com/forum/viewtopic.php?t=264, the following code is not permitted:
Code:
#if debugging
#define ASSERT(x)    asserttest(x)
#else
#define ASSERT(x)
#endif

void f(int *p)
    {
    ASSERT(p != 0);
    }

How would one make code well formed with respect to assertion macros?


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)