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

            Bug ID: 18787
           Summary: cland: Re-declaration of a local variable inside a
                    for-loop is allowed
           Product: clang
           Version: 3.3
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: libclang
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

The previous snippet builds fine while I would expect something like
"redeclaration of i without linkage".

[code]
#include <stdio.h>

int
main(void)
{
    int i;

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

    return (0);
}
[/code]

Environment:

$ clang --version
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.1
Thread model: posix

$ uname -a
Darwin Davides-MacBook-Pro.local 13.0.1 Darwin Kernel Version 13.0.1: Thu Sep
19 19:30:57 PDT 2013; root:xnu-2422.50.20~2/RELEASE_X86_64 x86_64

-- 
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