goto implementation doesnt work in all methods

General questions regarding the usage of CodeLite
hbr_in
CodeLite Expert
Posts: 113
Joined: Fri Jul 11, 2008 9:12 am
Contact:

goto implementation doesnt work in all methods

Post by hbr_in »

Dear Eran,

I have a peculiar issue with CL & Our customized compiler. Our Companies compiler takes attributes in front of Functions as optimization parameters.
CL fails to parse these functions properly. Example given below. As a result goto implementation & declaraion fails.

Code: Select all

static
BOOL send_cmd (			/* Returns TRUE when function succeeded otherwise returns FALSE */
	UWORD32 idx,		/* Command index (bit[5..0]), ACMD flag (bit7) */
	UWORD32 arg,		/* Command argument */
	UWORD32 rt,			/* Expected response type. None(0), Short(1) or Long(2) */
	UWORD32 dataTxRx,	/* Data Tx/Rx Command */
	UWORD32 *buff		/* Response return buffer */
) attribute(no_loop)
{
          .....
          .....
          .....
}
Is there any solution for this.

Thanks in advance

Regards
You do not have the required permissions to view the files attached to this post.
hbr_in
CodeLite Expert
Posts: 113
Joined: Fri Jul 11, 2008 9:12 am
Contact:

Re: goto implementation doesnt work in all methods

Post by hbr_in »

Hi,

Any update on this.

Thanks & regards
Gururaja
jfouche
CodeLite Guru
Posts: 351
Joined: Mon Oct 20, 2008 7:26 pm
Genuine User: Yes
IDE Question: C++
Location: France
Contact:

Re: goto implementation doesnt work in all methods

Post by jfouche »

Could you give a try to : Settings -> Tags settings -> Advanced
Add attribute(no_loop) at the end of the macro list
Jérémie
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: goto implementation doesnt work in all methods

Post by eranif »

hbr_in wrote:Hi,

Any update on this.

Thanks & regards
Gururaja
Hi,

codelite trunk now supports a unique replacement table (from settings -> tags settings -> advanced) that can handle complex cases.
for example, to fix your case, you can add the following line:

Code: Select all

attribute(%0)
If you are using SVN trunk, you can update. Otherwise, it will be available in the next release
Eran
Make sure you have read the HOW TO POST thread
Post Reply