1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 // expected-no-diagnostics
4 // floating-point overloads
6 __typeof__(0 + 0.0L) ld0
;
7 long double &ldr
= ld0
;
9 __typeof__(0 + 0.0) d0
;
12 __typeof__(0 + 0.0f
) f0
;
15 // integral promotions
18 __typeof__(c0
+ c0
) c1
;
22 __typeof__(uc0
+ uc0
) uc1
;
26 __typeof__(s0
+ s0
) s1
;
30 __typeof__(us0
+ us0
) us1
;
35 __typeof__(0 + 0UL) ul0
;
36 unsigned long &ulr
= ul0
;
38 template<bool T
> struct selector
;
39 template<> struct selector
<true> { typedef long type
; };
40 template<> struct selector
<false> {typedef unsigned long type
; };
41 __typeof__(0U + 0L) ui_l0
;
42 selector
<(sizeof(long) > sizeof(unsigned int))>::type
&ui_lr
= ui_l0
;
44 __typeof__(0 + 0L) l0
;
47 __typeof__(0 + 0U) u0
;