source: src/tests/expression.c @ e3e16bc

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsdeferred_resndemanglerenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newwith_gc
Last change on this file since e3e16bc was e757af2, checked in by Thierry Delisle <tdelisle@…>, 8 years ago

renamed all tests to lower-case leading character

  • Property mode set to 100644
File size: 476 bytes
Line 
1int main() {
2    struct s { int i; } x, *p = &x;
3    int i = 3;
4
5    // operators
6
7    ! i;
8    ~i;
9    +i;
10    -i;
11    *p;
12    ++p;
13    --p;
14    p++;
15    p--;
16
17    i+i;
18    i-i;
19    i*i;
20
21    i/i;
22    i%i;
23    i^i;
24    i&i;
25    i|i;
26    i<i;
27    i>i;
28    i=i;
29
30    i==i;
31    i!=i;
32    i<<i;
33    i>>i;
34    i<=i;
35    i>=i;
36    i&&i;
37    i||i;
38    p->i;
39    i*=i;
40    i/=i;
41    i%=i;
42    i+=i;
43    i-=i;
44    i&=i;
45    i|=i;
46    i^=i;
47    i<<=i;
48    i>>=i;
49
50    i?i:i;
51} // main
Note: See TracBrowser for help on using the repository browser.