1 /* Static declarations followed by extern are OK even if the extern
2 declaration is initialized. Bug 15360 from hozelda at
4 /* Origin: Joseph Myers <jsm@polyomino.org.uk> */
5 /* { dg-do compile } */
6 /* { dg-options "" } */
14 extern int b
= 1; /* { dg-warning "initialized and declared" "extern init warning" } */
18 static int c
; /* { dg-message "note: previous declaration" } */
19 int c
; /* { dg-error "non-static" "correct error" } */
21 static int d
; /* { dg-message "note: previous declaration" } */
22 int d
= 1; /* { dg-error "non-static" "correct error" } */
24 void foo (void) { extern int e
= 1; } /* { dg-error "has both" "extern init in function" } */