[LLVMbugs] [Bug 14491] New: shadowing declaration in try catch block flagged as redefinition error

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Dec 3 09:29:07 PST 2012


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

             Bug #: 14491
           Summary: shadowing declaration in try catch block flagged as
                    redefinition error
           Product: clang
           Version: 3.2
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: stephan.bergmann.secondary at googlemail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


At least with Clang built from tags/RELEASE_32/rc2, "clang++ test.cc" on

> int main() {
>   int i = 1;
>   try {
>     int i = 2;
>   } catch (...) {}
> }

fails with

> test.cc:4:9: error: redefinition of 'i'
>     int i = 2;
>         ^
> test.cc:2:7: note: previous definition is here
>   int i = 1;
>       ^
> 1 error generated.

(while Clang 3.1 does not fail).

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



More information about the llvm-bugs mailing list