Using CCS V3.3.81.11 and building some borrowed Linux include files that I am porting to the OMAP-L137. Works fine with gcc, OMAP35X and beagleboard builds. Below macro causes internal compile error. Only solution thus far is to not make it a macro.
#define CIRC_CNT_TO_END(head,tail,size) \
({int end = (size) - (tail); \
int n = ((head) + end) & ((size)-1); \
n < end ? n : end;})
Following line in C++ routine fails:
int endCount;
endCount = CIRC_CNT_TO_END(recv->head,recv->tail,recv->size);
Get:
INTERNAL ERROR: Invalid I-code record, aborting
Following line works fine if don't reference Macro but does same thing:
int end = (recv->size) - (recv->tail);
int n = ((recv->head) + end) & ((recv->size)-1);
endCount = n < end ? n : end;
Kev