sparse, llvm: Kill ifdef'd unssa() call
[smatch.git] / validation / specifiers1.c
blob1a4e1d57ea3b663363dce14f33b5ff9d2cb7ca1f
1 static void OK(void)
3 #define TEST(x) { T a; x *b = &a; }
4 #define TEST2(x, y) TEST(x y) TEST(y x)
5 #define TEST3(x, y, z) TEST(x y z) TEST(x z y) TEST(y x z) \
6 TEST(y z x) TEST(z x y) TEST(z y x)
7 #define TEST4(x, y, z, w) TEST2(x y, z w) TEST2(x y, w z) \
8 TEST2(y x, z w) TEST2(y x, w z) \
9 TEST2(x z, y w) TEST2(x z, w y) \
10 TEST2(z x, y w) TEST2(z x, w y) \
11 TEST2(x w, y z) TEST2(x w, z y) \
12 TEST2(w x, y z) TEST2(w x, z y)
15 #define T char
16 TEST(char)
17 #undef T
19 #define T signed char
20 TEST2(char, signed)
21 #undef T
23 #define T unsigned char
24 TEST2(char, unsigned)
25 #undef T
27 #define T short
28 TEST(short)
29 TEST2(int, short)
30 #undef T
32 #define T int
33 TEST(int)
34 #undef T
36 #define T long
37 TEST(long)
38 TEST2(int, long)
39 #undef T
41 #define T long long
42 TEST2(long, long)
43 TEST3(int, long, long)
44 #undef T
46 #define T signed short
47 TEST2(short, signed)
48 TEST3(int, short, signed)
49 #undef T
51 #define T signed
52 TEST(signed)
53 TEST2(int, signed)
54 #undef T
56 #define T signed long
57 TEST2(long, signed)
58 TEST3(int, long, signed)
59 #undef T
61 #define T signed long long
62 TEST3(long, long, signed)
63 TEST4(int, long, long, signed)
64 #undef T
66 #define T unsigned short
67 TEST2(short, unsigned)
68 TEST3(int, short, unsigned)
69 #undef T
71 #define T unsigned
72 TEST(unsigned)
73 TEST2(int, unsigned)
74 #undef T
76 #define T unsigned long
77 TEST2(long, unsigned)
78 TEST3(int, long, unsigned)
79 #undef T
81 #define T unsigned long long
82 TEST3(long, long, unsigned)
83 TEST4(int, long, long, unsigned)
84 #undef T
86 #define T float
87 TEST(float)
88 #undef T
90 #define T double
91 TEST(double)
92 #undef T
94 #define T long double
95 TEST2(double, long)
96 #undef T
99 * check-name: valid specifier combinations
100 * check-command: sparse $file