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

           Summary: clang rejects valid redeclaration of function declared
                    in nested scope
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Semantic Analyzer
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


If I am not mistaken, clang is incorrect to reject the following program:
--
ddun...@lordcrumb:tmp$ cat t.c
void f0(void) {
  extern void g0(void);
}
g0(void) {}
ddun...@lordcrumb:tmp$ gcc -std=gnu89 -c t.c
t.c:4: warning: conflicting types for 'g0'
t.c:2: warning: previous declaration of 'g0' was here
ddun...@lordcrumb:tmp$ clang -std=gnu89 -c t.c
t.c:4:1: error: conflicting types for 'g0'
g0(void) {}
^
t.c:2:15: note: previous declaration is here
  extern void g0(void);
              ^
2 diagnostics generated.
--


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