summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/bitfield.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Sema/bitfield.c')
-rw-r--r--clang/test/Sema/bitfield.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/test/Sema/bitfield.c b/clang/test/Sema/bitfield.c
index 0022b4d62ff..7a7f96c752c 100644
--- a/clang/test/Sema/bitfield.c
+++ b/clang/test/Sema/bitfield.c
@@ -19,5 +19,9 @@ struct a {
enum e0 f : 1; // expected-error {{field has incomplete type 'enum e0'}}
int g : (_Bool)1;
+
+ // PR4017
+ char : 10; // expected-error {{size of anonymous bitfield exceeds size of its type (8 bits)}}
+ unsigned : -2; // expected-error {{anonymous bit-field has negative width (-2)}}
+ float : 12; // expected-error {{anonymous bit-field has non-integral type 'float'}}
};
-
OpenPOWER on IntegriCloud