comparison gcc/testsuite/gcc.dg/Wredundant-decls-2.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
1 /* Test for -Wredundant-decls warnings */
2 /* { dg-do compile } */
3 /* { dg-options "-Wredundant-decls" } */
4
5 int j = 5; /* { dg-message "5:note: previous" } */
6 int j; /* { dg-warning "5:redundant" } */
7
8 static int k;
9 static int k = 5; /* { dg-message "12:note: previous" } */
10 static int k; /* { dg-warning "12:redundant" } */
11
12 static int l = 5; /* { dg-message "12:note: previous" } */
13 static int l; /* { dg-warning "12:redundant" } */
14
15 static int m; /* { dg-message "12:note: previous" } */
16 static int m; /* { dg-warning "12:redundant" } */
17 static int m = 5;
18
19 int n; /* { dg-message "5:note: previous" } */
20 int n; /* { dg-warning "5:redundant" } */
21 int n = 5;
22
23 static int o;
24 static int o = 5;
25
26 int p;
27 int p = 5;