#include /* ----------------- Example code from MISRA C:2012 begin ----------------- */ #define AA 0xffff #define BB( x ) ( x ) + wow ## x /* Non-compliant */ void f ( void ) { int32_t wowAA = 0; wowAA = BB ( AA ); } int32_t speed; int32_t speed_scale; int32_t scaled_speed; #define SCALE( X ) ( ( X ) * X ## _scale ) /* Compliant */ scaled_speed = SCALE ( speed ); /* ------------------ Example code from MISRA C:2012 end ------------------ */