Hackfix and re-enable strtoull and wcstoull, see bug #3798.
[sdcc.git] / sdcc / support / valdiag / tests / funcdec.c
blobc2e10bbc531090c931a62f40a285c915a5aa3725
2 #ifdef TEST1
3 void foo(void); /* IGNORE */
4 int foo(void) { } /* ERROR */
5 #endif
7 #ifdef TEST2
8 void foo(void); /* IGNORE */
9 void foo(int a) {a; } /* ERROR */
10 #endif
13 #ifdef TEST3
14 void foo(int); /* IGNORE */
15 void foo(int a, int b) {a;b; } /* ERROR */
16 #endif
18 #ifdef TEST4
19 void foo(int, int); /* IGNORE */
20 void foo(int a) {a; } /* ERROR */
21 #endif
23 #if defined(__SDCC) && defined(__has_reentrant)
24 #define REENTRANT __reentrant
25 #define HAS_REENTRANT 1
26 #else
27 #define REENTRANT
28 #define HAS_REENTRANT 0
29 #endif
31 #ifdef TEST5
32 void foo(int, int) REENTRANT; /* IGNORE */
33 #if HAS_REENTRANT
34 void foo(int a, int b) {a; b;} /* ERROR(SDCC && __has_reentrant && !SDCC_STACK_AUTO) */
35 #endif
36 #endif
38 #ifdef TEST6
39 void foo(int a=1) /* ERROR */
42 #endif
44 #ifdef TEST7
45 void foo(static int a) /* ERROR */
48 #endif