Community
Participate
Working Groups
In the following code create local variable for 'warning'. bool h; bool r; void DemoFunction() { int errors = 0; // long if if (h) { printf("h\n"); } else if (r) { printf("r\n"); } else { printf("<none>\n"); } // print comment printf("errors: %d, warnings: %d\n", errors, warnings); } The result is: bool h; bool r; void DemoFunction() { int errors = 0; if(h){ printf("h\n"); }else if(r){ printf("r\n"); }else{ printf("<none>\n"); } int warnings; printf("errors: %d, warnings: %d\n", errors, warnings); } Comments should be preserved. Code above the declaration insertion point should be left intact.
Fixed together with bug 363244.