[LLVMbugs] [Bug 6702] New: Wrong scoping for function parameter names?

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Mar 25 08:30:20 PDT 2010


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

           Summary: Wrong scoping for function parameter names?
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: dgregor at apple.com
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


Clang rejects this code in C++ mode:

  typedef int a;
  void f(int a, a b);

while EDG and GCC accept it (the name 'a' binds to the typedef in global
scope).

Note that this code is ill-formed in C, indicating that the scope of function
parameter names differs between the two languages. I haven't been able to track
down the wording that makes this different.

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