11-12-2007, 12:14 PM
Moving the semicolon to the macro definition removes the null statement issue.
Code:
#if debugging
#define ASSERT(x) asserttest(x); /* not compliant with 19.4. */
#else
#define ASSERT(x)
#endif
void f(int *p)
{
ASSERT(p != 0)
}
Posted by and on behalf of the MISRA C Working Group