Rule 14.3

6.14 Control Flow

Moderators: misra-c, david ward

Post Reply
mshearer123
Posts: 14
Joined: Thu Feb 18, 2010 11:28 am
Company: TME

Rule 14.3

Post by mshearer123 » Wed Mar 17, 2010 3:50 pm

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

jbezem
Posts: 20
Joined: Mon Aug 01, 2005 8:24 pm
Company: JB Enterprises
Location: Germany
Contact:

Re: Rule 14.3

Post by jbezem » Thu Mar 18, 2010 9:30 am

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
Johan Bezem
Email: [email protected]
Tel: +49 172 5463210
Web: http://www.bezem.de/

mshearer123
Posts: 14
Joined: Thu Feb 18, 2010 11:28 am
Company: TME

Re: Rule 14.3

Post by mshearer123 » Thu Mar 18, 2010 10:30 am

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

misra-c
Posts: 569
Joined: Thu Jan 05, 2006 1:11 pm

Re: Rule 14.3

Post by misra-c » Thu May 13, 2010 10:50 am

It is not clear that there is any technical issue with the MISRA C Guidelines relating to this question.
---
Posted by and on behalf of
the MISRA C Working Group

Post Reply

Return to “6.14 Control Flow”