Hi I'm upgrading from CIL 1.3.6 to CIL 1.4.0 and we use -Wall -Werror to compile. GCC complains about unused labels, take this illustrative example:
int main() { int i; for(i = 0; i < 4; i++) { char * pTest; if(!pTest) continue; else break; } return 0; } /* Generated by CIL v. 1.4.0 */ /* print_CIL_Input is true */ #line 1 "test.c" int main(void) { int i ; char *pTest ; { #line 6 i = 0; #line 6 while (i < 4) { #line 9 if (! (! pTest)) { #line 10 break; } __Cont: /* CIL Label */ #line 6 i ++; } #line 15 return (0); } } # cc test.instr.c -o test.instr -Wall test.c: In function 'main': test.c:12: warning: label '__Cont' defined but not used test.c:9: warning: 'pTest' may be used uninitialized in this function In src/frontc/cabs2cil.ml : continueOrLabelChunk() there is lr := newLabelName "__Cont" And newLabelName() calls newAlphaName(). I think you can apply attributes to a label. (In c, not c++) How can I hack in the unused attribute? Or is there another way to fix this? __Cont: __attribute__ ((__unused__)) Thanks - Jan ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ CIL-users mailing list CIL-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cil-users