This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

ARM Compiler - Unexpected MISRA Warning: 14.3



Hi Compiler Team, 

my customer is using the V4.70B2 Compiler Tools and run into the following issue:

I have a MISRA warning on CCS which I think may be problems with the MISRA check itself.

(MISRA-C:2004 14.3/R) Before preprocessing, a null statement shall only occur on a line by itself; it may be followed by a comment provided that the first character following the null statement is a white-space character. 

In the following code I get MISRA 14.3 warning on line NULL_DEF;. The line with true null statement ; is okay.

#define NULL_DEF

voidmfFunc(void)
{
    NULL_DEF;
    ;
} 

In my view, the statement ‘NULL_DEF;’ is not null before preprocessing (the raw source). After preprocessing, the statement collapses to ‘;’ and so should not provoke the warning.

Please advise!

Thanks and best regards,
Joe