c99-to-c89 icon indicating copy to clipboard operation
c99-to-c89 copied to clipboard

Nested loops are mangled

Open kornelski opened this issue 12 years ago • 1 comments

void test()
{
    for(int j=0; j < 10; j++) {
        for(int i=0; i < 20; i++) {
        }
    }
}

is converted to

void test()
{
    { int j=0; for( ; i < 20; i++) {
        }
    } }
}

kornelski avatar Mar 07 '13 17:03 kornelski

I can reproduce this, and I created a test case at https://github.com/mstorsjo/c99-to-c89/commit/nested-for.

mstorsjo avatar Mar 07 '13 17:03 mstorsjo