22-10-2007, 02:51 PM
Since, according to http://www.misra-c2.com/forum/viewtopic.php?t=264, the following code is not permitted:
How would one make code well formed with respect to assertion macros?
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?