http://d.puremagic.com/issues/show_bug.cgi?id=2423
Don <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch CC| |[email protected] --- Comment #6 from Don <[email protected]> 2009-08-07 08:35:26 PDT --- To remove the warning from empty statements: PATCH: statement.c, line 564 (DMD2) - if (!(result & BEfallthru) && !s->comeFrom()) + if (!(result & BEfallthru) && !s->comeFrom() && !s->isEmpty()) { s->warning("statement is not reachable"); } And then add this line to ExpStatement, in statement.h line 140: virtual int isEmpty() { return exp==NULL; } Side effect: This will make {;;;;;} an empty statement; at the moment, it isn't. The patch below makes the code below compile (into return 2;). Currently it won't compile, but works if try{;} is changed into try{}. nothrow int main() { int x= 2; try { ; } catch(Exception e) { x=4; throw new Exception("xxx"); } return x; } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
