Hackfix and re-enable strtoull and wcstoull, see bug #3798.
[sdcc.git] / sdcc / support / valdiag / tests / enum.c
blob6558f1338dbcaef47861f606d2ff6f7b6f9f6b3d
2 #ifdef TEST1
3 enum tag
5 first,
6 second,
7 third
8 };
9 #endif
11 #ifdef TEST2
12 enum tag
14 first, /* IGNORE */
15 second,
16 third,
17 first, /* ERROR */
18 fourth
20 #endif
23 #ifdef TEST3
24 enum
26 first, /* IGNORE */
27 second,
28 third,
29 first, /* ERROR */
30 fourth
32 #endif
35 #ifdef TEST4
36 enum
38 first=1,
39 second,
40 third,
42 #endif
45 #ifdef TEST5
46 enum
48 first=1.1, /* ERROR */
49 second,
50 third,
52 #endif
54 #ifdef TEST6
55 int second; /* IGNORE */
57 enum tag
59 first,
60 second, /* ERROR */
61 third
63 #endif
65 #ifdef TEST7
66 enum tag /* IGNORE */
68 first,
69 second,
70 third
73 enum tag { /* ERROR */
74 fourth,
75 fifth,
76 sixth
78 #endif
80 #ifdef TEST8
81 enum tag x; /* IGNORE(GCC) */
83 enum tag
85 first,
86 second,
87 third
89 #endif
91 #ifdef TEST9
92 enum comma
94 first,
95 second,, /* ERROR */
97 #endif
99 // C23 allows multiple compatible definitions for enum.
100 #ifdef TEST10
101 #ifdef __SDCC
102 #pragma std_c23
103 #endif
105 enum X {A = 1, B}; /* IGNORE */
106 enum X {B = 2, A = 1}; /* IGNORE(GCC) */
107 enum X {A = 1, B = 3}; /* ERROR */
109 #endif