summaryrefslogtreecommitdiff
path: root/05/tcc-0.9.27/tests/pp/21.c
blob: 1316226a2e7bef085a2ce13d10e030f49b93f7dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/* accept 'defined' as result of substitution */

----- 1 ------
#define AAA 2
#define BBB
#define CCC (defined ( AAA ) && AAA > 1 && !defined BBB)
#if !CCC
OK
#else
NOT OK
#endif

----- 2 ------
#undef BBB
#if CCC
OK
#else
NOT OK
#endif

----- 3 ------
#define DEFINED defined
#define DDD (DEFINED ( AAA ) && AAA > 1 && !DEFINED BBB)
#if (DDD)
OK
#else
NOT OK
#endif

----- 4 ------
#undef AAA
#if !(DDD)
OK
#else
NOT OK
#endif