Jump to content
Reynard

Inline Assembly Bug

Recommended Posts

This statement gives "error:missing right paren"

 

asm {bcf _y+3,7}

 

But this statement compiles without any error

 

asm {bcf _y+3,7

}

 

Why is the closing (on same line) not seen in the first instance ?

 

Cheers

 

Reynard

 

BoostC 6.90 XP Pro SP3, PIC18F8722

Share this post


Link to post
Share on other sites

This is not a bug but done by design. Right after an open curly brace compiler starts using Assembly parser instead of C parser and Assembly parser gets used till compiler sees a closed curly brace on a new line. If a curly brace is found after an assembly statement o the same line it's the Asembly parser that handles it and because this is not part of assembly rules that the Assembly parser knows it reports an error.

 

Regards,

Pavel

Share this post


Link to post
Share on other sites

Hmmmmmmmmm

 

Maybe design features like this should be described in the manual as embedded assembler syntax rules or something.

 

Cheers

 

Reynard

Share this post


Link to post
Share on other sites
...Maybe design features like this should be described in the manual as embedded assembler syntax rules or something...

 

We have added relevant note to the compiler help file. It will be available in the next release.

 

Regards,

Pavel

Share this post


Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...