Jump to content
Sign in to follow this  

Asm Comment Parsing Errors

Recommended Posts

Bug description:

BoostC is not correctly skipping over comments within asm blocks.


Example code:

#include <system.h>

void main(void)
	nop; //comment with asm in it
	nop; //comment with asmprefix in it
	nop; //comment with suffixasm in it
	nop; //comment without it


The first 3 "nop" lines will generate the following error:

file(line): error: error in built-in assembly


Expected behavior:

Compiler should ignore all text on a line after ";" or maybe "//" (depending on how that is supposed to work). If for some reason it must scan comments for the token "asm", then it should at least ignore it when it is part of a larger string (second and third "nop" lines in the example code).


Is the problem 100% reproduceable:






Compiler version:



Target device:

PIC16F1827, etc.



Windows XP



Share this post

Link to post
Share on other sites

Your content will need to be approved by a moderator

You are commenting as a guest. If you have an account, please sign in.
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.

Sign in to follow this