MISRA Discussion Forums
Rule 14.3 - Printable Version

+- MISRA Discussion Forums (https://forum.misra.org.uk)
+-- Forum: MISRA C (https://forum.misra.org.uk/forumdisplay.php?fid=4)
+--- Forum: MISRA-C: 2004 rules (https://forum.misra.org.uk/forumdisplay.php?fid=17)
+---- Forum: 6.14 Control Flow (https://forum.misra.org.uk/forumdisplay.php?fid=46)
+---- Thread: Rule 14.3 (/showthread.php?tid=718)



Rule 14.3 - mshearer123 - 17-03-2010

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


Re: Rule 14.3 - jbezem - 18-03-2010

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


Re: Rule 14.3 - mshearer123 - 18-03-2010

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


Re: Rule 14.3 - misra-c - 13-05-2010

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