diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-04-08 21:33:23 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-04-08 21:33:23 +0000 |
commit | cb821d045f5e445384f34d05a526955036073c4a (patch) | |
tree | df65855fc07b4d78aa1419c30edc2b9771644001 /test/Sema/anonymous-struct-union.c | |
parent | 7732cc9c0fdc97a2f8cce4e5933d8103213d1aef (diff) |
Downgrade the "declaration does not declare anything" error to a
warning. It's not harmful to have such pointless declarations, and GCC
does not diagnose this issue consistently.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100814 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/anonymous-struct-union.c')
-rw-r--r-- | test/Sema/anonymous-struct-union.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/Sema/anonymous-struct-union.c b/test/Sema/anonymous-struct-union.c index 78995a993a..118854fd47 100644 --- a/test/Sema/anonymous-struct-union.c +++ b/test/Sema/anonymous-struct-union.c @@ -50,12 +50,12 @@ struct Redecl { void zz(); // expected-error{{duplicate member 'zz'}} }; -union { // expected-error{{declaration does not declare anything}} +union { // expected-warning{{declaration does not declare anything}} int int_val; float float_val; }; -static union { // expected-error{{declaration does not declare anything}} +static union { // expected-warning{{declaration does not declare anything}} int int_val2; float float_val2; }; @@ -66,7 +66,7 @@ void f() { } void g() { - union { // expected-error{{declaration does not declare anything}} + union { // expected-warning{{declaration does not declare anything}} int i; float f2; }; @@ -78,7 +78,7 @@ void g() { struct s0 { union { int f0; }; }; // <rdar://problem/6481130> -typedef struct { }; // expected-error{{declaration does not declare anything}} +typedef struct { }; // expected-warning{{declaration does not declare anything}} // PR3675 struct s1 { @@ -89,7 +89,7 @@ struct s1 { }; // PR3680 -struct {}; // expected-error{{declaration does not declare anything}} +struct {}; // expected-warning{{declaration does not declare anything}} struct s2 { union { |