diff options
author | Andreas Schwab <schwab@gcc.gnu.org> | 2005-09-02 20:45:43 +0000 |
---|---|---|
committer | Andreas Schwab <schwab@gcc.gnu.org> | 2005-09-02 20:45:43 +0000 |
commit | 810d4c7ba0581cc1a62f54d808b2ce7a633c5c29 (patch) | |
tree | a12d038d51996472b11fce824fc4d14dd9d70e78 | |
parent | 8845001b6c4505809a171c3f37790efd1335e7f7 (diff) | |
download | gcc-810d4c7ba0581cc1a62f54d808b2ce7a633c5c29.zip gcc-810d4c7ba0581cc1a62f54d808b2ce7a633c5c29.tar.gz gcc-810d4c7ba0581cc1a62f54d808b2ce7a633c5c29.tar.bz2 |
Move from root of repository to intented place.
From-SVN: r103796
-rw-r--r-- | gcc/testsuite/gcc.dg/Wredundant-decls-2.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/Wredundant-decls-2.c b/gcc/testsuite/gcc.dg/Wredundant-decls-2.c new file mode 100644 index 0000000..b10840f --- /dev/null +++ b/gcc/testsuite/gcc.dg/Wredundant-decls-2.c @@ -0,0 +1,27 @@ +/* Test for -Wredundant-decls warnings */ +/* { dg-do compile } */ +/* { dg-options "-Wredundant-decls" } */ + +int j = 5; /* { dg-warning "previous" } */ +int j; /* { dg-warning "redundant" } */ + +static int k; +static int k = 5; /* { dg-warning "previous" } */ +static int k; /* { dg-warning "redundant" } */ + +static int l = 5; /* { dg-warning "previous" } */ +static int l; /* { dg-warning "redundant" } */ + +static int m; /* { dg-warning "previous" } */ +static int m; /* { dg-warning "redundant" } */ +static int m = 5; + +int n; /* { dg-warning "previous" } */ +int n; /* { dg-warning "redundant" } */ +int n = 5; + +static int o; +static int o = 5; + +int p; +int p = 5; |