Hackfix and re-enable strtoull and wcstoull, see bug #3798.
[sdcc.git] / sdcc / support / valdiag / tests / tentdecl.c
blob8b8e6b7d5c5dc5fda03e9d8d9cc6743df681325e
2 #ifdef TEST0
3 int a;
4 int a;
5 #endif
7 #ifdef TEST1
8 int a; /* IGNORE */
9 char a; /* ERROR */
10 #endif
12 #ifdef TEST2
13 int a; /* IGNORE */
14 int *a; /* ERROR */
15 #endif
17 #ifdef TEST3
18 int *a; /* IGNORE */
19 int a[5]; /* ERROR */
20 #endif
22 /* array size must match */
24 #ifdef TEST4
25 int a[4]; /* IGNORE */
26 int a[5]; /* ERROR */
27 #endif
29 /* but it is legal to clarify */
30 /* an incomplete type */
32 #ifdef TEST4b
33 int a[];
34 int a[5];
35 #endif
37 /* type qualifier must match */
39 #ifdef TEST5
40 int a; /* IGNORE */
41 volatile int a; /* ERROR */
42 #endif
44 #ifdef TEST6
45 int a; /* IGNORE */
46 const int a; /* ERROR */
47 #endif
49 #ifdef TEST7
50 int a=1; /* IGNORE */
51 int a=2; /* ERROR */
52 #endif
54 #ifdef TEST7a
55 int a=1;
56 int a;
57 #endif
59 #ifdef TEST8
60 int a=1; /* IGNORE */
61 int a=1; /* ERROR */
62 #endif
64 #if defined(__SDCC)
65 #define AT(x) __at x
66 #else
67 #define AT(x)
68 #endif
70 #if defined(__has_xdata)
71 #define XDATA __xdata
72 #define DATA __data
73 #else
74 #define XDATA
75 #define DATA
76 #endif
78 #ifdef TEST9
79 #ifdef __SDCC
80 XDATA int a; /* IGNORE */
81 DATA int a; /* IGNORE(SDCC && __has_xdata) */ // Should be error, see bug #2735.
82 #endif
83 #endif
85 #ifdef TEST9b
86 #ifdef __SDCC
87 DATA int a; /* IGNORE */
88 XDATA int a; /* ERROR(SDCC && __has_xdata) */
89 #endif
90 #endif
92 #ifdef TEST9c
93 #ifdef __SDCC
94 extern DATA int a;
95 DATA int a;
96 #endif
97 #endif
99 #ifdef TEST9d
100 #ifdef __SDCC
101 extern XDATA int a;
102 XDATA int a;
103 #endif
104 #endif
106 #ifdef TEST9e
107 #ifdef __SDCC
108 extern XDATA int a; /* IGNORE */
109 DATA int a; /* ERROR(SDCC && __has_xdata) */
110 #endif
111 #endif
113 #ifdef TEST9f
114 #ifdef __SDCC
115 extern DATA int a; /* IGNORE */
116 XDATA int a; /* ERROR(SDCC && __has_xdata) */
117 #endif
118 #endif
120 #ifdef TEST10
121 #if defined(__SDCC) && defined(__has_xdata)
122 extern volatile XDATA AT(0) int a; /* IGNORE */
123 volatile XDATA int a; /* ERROR(SDCC && __has_xdata) */
124 #endif
125 #endif
127 int validDeclaraction; /* to make sure this is never an empty source file */