ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsdeferred_resndemanglerenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumwith_gc
Last change
on this file since 2248dc7 was
e757af2,
checked in by Thierry Delisle <tdelisle@…>, 9 years ago
|
renamed all tests to lower-case leading character
|
-
Property mode set to
100644
|
File size:
870 bytes
|
Line | |
---|
1 | int x; |
---|
2 | typedef double y; |
---|
3 | typedef float t; |
---|
4 | y z; |
---|
5 | //otype u = struct { int a; double b; }; |
---|
6 | typedef struct { int a; double b; } u; |
---|
7 | int f( int y ); |
---|
8 | y q; |
---|
9 | struct x { int x; }; |
---|
10 | |
---|
11 | y w( y y, u v ) { |
---|
12 | // otype x | { x t(u); }; |
---|
13 | void ?{}(struct x *); |
---|
14 | void ^?{}(struct x *); |
---|
15 | extern struct x t( u ); |
---|
16 | u u = y; |
---|
17 | struct x z = t(u); |
---|
18 | } |
---|
19 | |
---|
20 | y p; |
---|
21 | |
---|
22 | trait has_u( otype z ) { |
---|
23 | z u(z); |
---|
24 | }; |
---|
25 | |
---|
26 | forall( otype t | has_u( t ) ) |
---|
27 | y q( t the_t ) { |
---|
28 | t y = u( the_t ); |
---|
29 | } |
---|
30 | |
---|
31 | t f( y p ) { |
---|
32 | int y; |
---|
33 | typedef char x; |
---|
34 | { |
---|
35 | x y; |
---|
36 | typedef x z; |
---|
37 | { |
---|
38 | z x; |
---|
39 | typedef z y; |
---|
40 | y z = x; |
---|
41 | } |
---|
42 | z x = y; |
---|
43 | } |
---|
44 | x q = y; |
---|
45 | } |
---|
46 | |
---|
47 | void some_func() {} |
---|
48 | |
---|
49 | t g( void ) { |
---|
50 | typedef char x; |
---|
51 | // try { |
---|
52 | some_func(); |
---|
53 | // } catch ( x x ) { |
---|
54 | // t y = x; |
---|
55 | // } |
---|
56 | x z; |
---|
57 | } |
---|
58 | |
---|
59 | y q( i ) /* K&R style */ |
---|
60 | int i; |
---|
61 | { |
---|
62 | switch ( i ) { |
---|
63 | y q = i; |
---|
64 | case 0: |
---|
65 | return q; |
---|
66 | default: |
---|
67 | return i; |
---|
68 | } |
---|
69 | } |
---|
70 | |
---|
71 | // Local Variables: // |
---|
72 | // tab-width: 4 // |
---|
73 | // End: // |
---|
Note: See
TracBrowser
for help on using the repository browser.