summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/exprs.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Sema/exprs.c')
-rw-r--r--clang/test/Sema/exprs.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/test/Sema/exprs.c b/clang/test/Sema/exprs.c
index 5413757df79..db2daf1f7ca 100644
--- a/clang/test/Sema/exprs.c
+++ b/clang/test/Sema/exprs.c
@@ -50,7 +50,10 @@ int test8(void) {
// PR3386
struct f { int x : 4; float y[]; };
int test9(struct f *P) {
- return __alignof(P->x) + // expected-error {{invalid application of '__alignof' to bitfield}} expected-warning {{extension used}}
- __alignof(P->y); // ok. expected-warning {{extension used}}
+ int R;
+ R = __alignof(P->x); // expected-error {{invalid application of '__alignof' to bitfield}} expected-warning {{extension used}}
+ R = __alignof(P->y); // ok. expected-warning {{extension used}}
+ R = sizeof(P->x); // expected-error {{invalid application of 'sizeof' to bitfield}}
+ return R;
}
OpenPOWER on IntegriCloud