Brantley Coile wrote:
now means

        { int i; for(i=0; i<10; i++); }


Does that mean the following will compile?

void
f(void)
{
        i = 3;
        put(i);
        for (int i = 0; i < 3; i++)
                put(i);
        if (i == 4) put(4);
}


 cat > t.c
void
f(void)
{
        i = 3;
        put(i);
        for (int i = 0; i < 3; i++)
                put(i);
        if (i == 4) put(4);
}
[EMAIL PROTECTED] tmp]$ cc t.c
t.c: In function ‘f’:
t.c:4: error: ‘i’ undeclared (first use in this function)
t.c:4: error: (Each undeclared identifier is reported only once
t.c:4: error: for each function it appears in.)
t.c:6: error: ‘for’ loop initial declaration used outside C99 mode
[EMAIL PROTECTED] tmp]$


ron

Reply via email to