1 #if 0
2 #include <stdio.h>
3 #endif
4
5 int
main(void)6 main(void) {
7 char *lol[2];
8 unsigned long stuff = 2134633;
9 struct bogus {
10 char big[9999];
11 } b;
12 typedef union lolmonster {
13 char x;
14 int z;
15 double y;
16 short z2;
17 } lolmonster_t;
18
19 typeof(123) x = 5;
20 typeof(*lol) p = "Hello";
21 typeof(b) bla;
22 typeof(&b) blap;
23
24 printf("%s: %d\n", p, x);
25 blap = &bla;
26 blap->big[9] = 123;
27 printf("%d\n", bla.big[9]);
28
29 #if 0
30 /* XXX */
31 printf("alignment of long long is %d\n", __alignof__(long long));
32 #endif
33 printf("alignment of struct bogus: %d\n", __alignof(b));
34
35 if (__builtin_expect(123 != 456, 0)) {
36 puts(":)");
37 }
38 if (__builtin_expect(!555, 1)) {
39 puts(":(");
40 } else {
41 puts(":)");
42 }
43 {
44 int x = __builtin_expect(555555, 0);
45 printf("%d\n", x);
46 }
47 #if 0
48 printf("alignment of lolmonster: %d\n", __alignof__(lolmonster_t));
49 #endif
50
51 printf("%d\n", (__typeof__(unsigned char))stuff);
52
53 return 0;
54 }
55
56