scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

0078-dirifexpr.c (1586B)


      1 #if (-2) != -2
      2 #error fail
      3 #endif
      4 
      5 #if (0 || 0) != 0
      6 #error fail
      7 #endif
      8 
      9 #if (1 || 0) != 1
     10 #error fail
     11 #endif
     12 
     13 #if (1 || 1) != 1
     14 #error fail
     15 #endif
     16 
     17 #if (0 && 0) != 0
     18 #error fail
     19 #endif
     20 
     21 #if (1 && 0) != 0
     22 #error fail
     23 #endif
     24 
     25 #if (0 && 1) != 0
     26 #error fail
     27 #endif
     28 
     29 #if (1 && 1) != 1
     30 #error fail
     31 #endif
     32 
     33 #if (0xf0 | 1) != 0xf1
     34 #error fail
     35 #endif
     36 
     37 #if (0xf0 & 1) != 0
     38 #error fail
     39 #endif
     40 
     41 #if (0xf0 & 0x1f) != 0x10
     42 #error fail
     43 #endif
     44 
     45 #if (1 ^ 1) != 0
     46 #error fail
     47 #endif
     48 
     49 #if (1 == 1) != 1
     50 #error fail
     51 #endif
     52 
     53 #if (1 == 0) != 0
     54 #error fail
     55 #endif
     56 
     57 #if (1 != 1) != 0
     58 #error fail
     59 #endif
     60 
     61 #if (0 != 1) != 1
     62 #error fail
     63 #endif
     64 
     65 #if (0 > 1) != 0
     66 #error fail
     67 #endif
     68 
     69 #if (0 < 1) != 1
     70 #error fail
     71 #endif
     72 
     73 #if (0 > -1) != 1
     74 #error fail
     75 #endif
     76 
     77 #if (0 < -1) != 0
     78 #error fail
     79 #endif
     80 
     81 #if (0 >= 1) != 0
     82 #error fail
     83 #endif
     84 
     85 #if (0 <= 1) != 1
     86 #error fail
     87 #endif
     88 
     89 #if (0 >= -1) != 1
     90 #error fail
     91 #endif
     92 
     93 #if (0 <= -1) != 0
     94 #error fail
     95 #endif
     96 
     97 #if (0 < 0) != 0
     98 #error fail
     99 #endif
    100 
    101 #if (0 <= 0) != 1
    102 #error fail
    103 #endif
    104 
    105 #if (0 > 0) != 0
    106 #error fail
    107 #endif
    108 
    109 #if (0 >= 0) != 1
    110 #error fail
    111 #endif
    112 
    113 #if (1 << 1) != 2
    114 #error fail
    115 #endif
    116 
    117 #if (2 >> 1) != 1
    118 #error fail
    119 #endif
    120 
    121 #if (2 + 1) != 3
    122 #error fail
    123 #endif
    124 
    125 #if (2 - 3) != -1
    126 #error fail
    127 #endif
    128 
    129 #if (2 * 3) != 6
    130 #error fail
    131 #endif
    132 
    133 #if (6 / 3) != 2
    134 #error fail
    135 #endif
    136 
    137 #if (7 % 3) != 1
    138 #error fail
    139 #endif
    140 
    141 #if (2+2*3+2) != 10
    142 #error fail
    143 #endif
    144 
    145 #if ((2+2)*(3+2)) != 20
    146 #error fail
    147 #endif
    148 
    149 #if (2 + 2 + 2 + 2 == 2 + 2 * 3) != 1
    150 #error fail
    151 #endif
    152 
    153 #if (0 ? 1 : 3) != 3
    154 #error fail
    155 #endif
    156 
    157 #if (1 ? 3 : 1) != 3
    158 #error fail
    159 #endif
    160 
    161 int
    162 main()
    163 {
    164 	return 0;
    165 }
    166