http://llvm.org/bugs/show_bug.cgi?id=11324

             Bug #: 11324
           Summary: for loop variable scope
           Product: clang
           Version: 2.7
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified


the second "i" in

for (int i = 0; i < 10; ++i) {
  const int i = -1;
  ...
}

is flagged as redefinition error, while imho it should be regarded as
equivalent to standard shadowing:

int i = 0;
{
  const int i = -1;
  ...
}

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to