constant-builtins.c revision a5728872c7702ddd09537c95bc3cbd20e1f2fb09
1// RUN: %clang_cc1 -fsyntax-only %s -verify -pedantic 2 3// Math stuff 4 5float g0 = __builtin_huge_val(); 6double g1 = __builtin_huge_valf(); 7long double g2 = __builtin_huge_vall(); 8float g3 = __builtin_inf(); 9double g4 = __builtin_inff(); 10long double g5 = __builtin_infl(); 11 12// GCC misc stuff 13 14extern int f(); 15 16int h0 = __builtin_types_compatible_p(int,float); 17//int h1 = __builtin_choose_expr(1, 10, f()); 18//int h2 = __builtin_expect(0, 0); 19 20short somefunc(); 21 22short t = __builtin_constant_p(5353) ? 42 : somefunc(); 23 24 25