source: translator/examples/abstype.c @ a0d9f94

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsctordeferred_resndemanglerenumforall-pointer-decaygc_noraiijacob/cs343-translationjenkins-sandboxmemorynew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newstringwith_gc
Last change on this file since a0d9f94 was a0d9f94, checked in by Peter A. Buhr <pabuhr@…>, 10 years ago

add compiler flag to driver, update examples, fix unnamed bit fields

  • Property mode set to 100644
File size: 348 bytes
Line 
1// "cfa-cpp -nx Abstype.c"
2
3type T | { T x( T ); };
4
5T y( T t ) {
6    T t_instance;
7    return x( t );
8}
9
10forall(type T) lvalue T *?( T* );
11int ?++( int *);
12int ?=?( int*, int );
13forall(dtype DT) DT* ?=?( DT **, DT* );
14
15type U = int*;
16
17U x( U u ) {
18    U u_instance = u;
19    (*u)++;
20    return u;
21}
22
23int *break_abstraction( U u ) {
24    return u;
25}
Note: See TracBrowser for help on using the repository browser.