Is there a reason the defaultCilPrinterClass doesn't print line
directives before gotos? Not printing them makes the line numbers of the
output not quite agree with the original source. For example, CIL
converts:
int main() { goto L; L: return 0; }
into
#line 1 "file.c"
int main(void)
{
{
goto L;
L:
#line 1
return (0);
}
}
which makes 'goto L;' seem to be on line 5 of this one-line program!
Getting line directives for gotos that are in the original source
essentially just requires adding a call to 'self#pLineDirective' in the
Goto case of the printer class's pStmtKind method. But is there an easy
way of getting line directives to print before gotos that were inserted
by CIL?
-Elnatan
------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
CIL-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cil-users