MISRA Discussion Forums

Full Version: Rule 14.3
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,
I am running into this rule whenever using in-line assemebly in my blackfin project.

i.e

asm ("ssync;");
or
asm("nop;");

generated the error in ibm logiscope
"A null statements shall only occur on a line by itself, and shall not have any other text on the same line"

I assume this comes from having the two ";" characters on the one line.
But how can i overcome this?

Matthew
I don't know ibm logiscope, but if you replace any asm call with "(void)0" instead of "" for checking, the message might go away.
Defining a global exception may also be a solution for you.

HTH,

Johan
sorry I'm not entirely sure what you mean

so to replace:
asm ("ssync;");

i would use
(void)0

just to check that it will get rid of the error?

How do a define a global exception?

thanks again,

Matt
It is not clear that there is any technical issue with the MISRA C Guidelines relating to this question.