blob: b1c5e2af108ab9e82fd068110bda29610031f3b9 [file] [log] [blame]
Chris Lattner46cfefa2008-10-06 05:42:39 +00001// RUN: clang -fsyntax-only %s -verify -pedantic
Daniel Dunbarae3f4912008-10-02 23:30:31 +00002
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
Chris Lattner46cfefa2008-10-06 05:42:39 +000016int h0 = __builtin_types_compatible_p(int,float); // expected-warning {{extension}}
Daniel Dunbarae3f4912008-10-02 23:30:31 +000017//int h1 = __builtin_choose_expr(1, 10, f());
18//int h2 = __builtin_expect(0, 0);
Chris Lattner46cfefa2008-10-06 05:42:39 +000019
20short somefunc();
21
Anders Carlsson9e09f5d2008-12-05 05:09:56 +000022short t = __builtin_constant_p(5353) ? 42 : somefunc();
23
Chris Lattner46cfefa2008-10-06 05:42:39 +000024