1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 // expected-no-diagnostics
3 struct {unsigned x
: 2;} x
;
4 __typeof__((x
.x
+=1)+1) y
;
9 struct { int x
: 8; } x1
;
11 __typeof__(((long long)x1
.x
+ 1)) y1
;
14 // Check for extensions: variously sized unsigned bit-fields fitting
15 // into a signed int promote to signed int.
16 enum E
{ ec1
, ec2
, ec3
};
19 unsigned short us
: 4;
20 unsigned long long ul1
: 8;
21 unsigned long long ul2
: 50;
24 __typeof(s
.e
+ s
.e
) x_e
;
27 __typeof(s
.us
+ s
.us
) x_us
;
30 __typeof(s
.ul1
+ s
.ul1
) x_ul1
;
33 __typeof(s
.ul2
+ s
.ul2
) x_ul2
;
34 unsigned long long x_ul2
;