http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52050

             Bug #: 52050
           Summary: -Wdeclaration-after-statement does not warn on
                    declaration in for loop initialiser
    Classification: Unclassified
           Product: gcc
           Version: 4.6.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: m...@mansr.com


Consider this code:

void foo(void)
{
    for (int i = 0; i < 2; i++);
}

Compiling the above code with -std=c99 -Wdeclaration-after-statement
does not produce a warning as expected.

Reply via email to