https://llvm.org/bugs/show_bug.cgi?id=24243

            Bug ID: 24243
           Summary: No -Wshadow Warning on Extern Functions
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

$: cat t.c
extern void index2(void);
void foo3(void) {
  void (*index2)(void);
}
$: clang-trunk -c t.c -Weverything -Wno-missing-prototypes -Wno-unused-variable
$: gcc-trunk -c -Wshadow t.c
t.c: In function ‘foo3’:
t.c:3:10: warning: declaration of ‘index2’ shadows a global declaration
[-Wshadow]
   void (*index2)(void);
          ^
t.c:1:13: note: shadowed declaration is here
 extern void index2(void);
             ^
$:

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