1 /* { dg-do compile } */
2 /* { dg-options "-Wc++-compat" } */
3 int v1
; /* { dg-message "previous declaration" } */
4 int v1
; /* { dg-warning "invalid in C\[+\]\[+\]" } */
5 int v2
; /* { dg-message "previous declaration" } */
6 int v2
= 1; /* { dg-warning "invalid in C\[+\]\[+\]" } */
8 int v3
; /* { dg-message "previous declaration" } */
9 int v3
= 1; /* { dg-warning "invalid in C\[+\]\[+\]" } */
12 static int v5
; /* { dg-message "previous declaration" } */
13 static int v5
; /* { dg-warning "invalid in C\[+\]\[+\]" } */
14 static int v6
; /* { dg-message "previous declaration" } */
15 static int v6
= 1; /* { dg-warning "invalid in C\[+\]\[+\]" } */