1 #include <stdio.h>
2 
3 static int static_value = 0;
4 
5 int
a_function_to_call()6 a_function_to_call()
7 {
8     static_value++;
9     return static_value;
10 }
11 
main(int argc,char const * argv[])12 int main (int argc, char const *argv[])
13 {
14     printf ("Hello world!\n");
15     puts ("hello");
16     // Please test many expressions while stopped at this line:
17 #if 0
18     expression 'a'        // make sure character constant makes it down (this is broken: <rdar://problem/8686536>)
19     expression 2          // Test int
20     expression 2ull       // Test unsigned long long
21     expression 2.234f     // Test float constants
22     expression 2.234      // Test double constants
23     expression 2+3
24     expression argc
25     expression argc + 22
26     expression argv
27     expression argv[0]
28     expression argv[1]
29     expression argv[-1]
30     expression puts("bonjour")                        // Test constant strings...
31     expression printf("\t\x68\n")       // Test constant strings that contain the \xXX (TAB, 'h', '\n' should be printed) (this is broken: <rdar://problem/8686536>)
32     expression printf("\"\n")       // Test constant strings that contains an escaped double quote char (this is broken: <rdar://problem/8686536>)
33     expression printf("\'\n")       // Test constant strings that contains an escaped single quote char (this is broken: <rdar://problem/8686536>)
34     expression printf ("one: %i\n", 1)
35     expression printf ("1.234 as float: %f\n", 1.234f)
36     expression printf ("1.234 as double: %g\n", 1.234)
37     expression printf ("one: %i, two: %llu\n", 1, 2ull)
38     expression printf ("two: %llu, one: %i\n", 2ull, 1)
39     expression random() % 255l
40 #endif
41 
42     a_function_to_call();
43     return 0;
44 }
45