[LLVMbugs] [Bug 14296] New: function parameter name redeclarations not detected

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Nov 8 20:39:30 PST 2012


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

             Bug #: 14296
           Summary: function parameter name redeclarations not detected
           Product: clang
           Version: trunk
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: a.bataev at gmx.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


According to c++11 3.3.3/2 "A parameter name shall not be redeclared in the
outermost block of the function definition nor in the outermost block of any
handler associated with a function-try-block."
Here is the code.

void foo(int ii) try {
}
catch (...) {
    int ii;
}

int main() {
    foo(1);
    return (0);
}

clang++ -std=c++0x test.cpp

Compiles it without any diagnostics.

Alexey Bataev
Software Engineer
Intel Compiler Team
Intel Corp.

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