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 02e9ae2 was
42dcae7,
checked in by Peter A. Buhr <pabuhr@…>, 10 years ago
|
re-inserted remove and reorder hoisted aggregate, fixed example programs
|
-
Property mode set to
100644
|
File size:
431 bytes
|
Rev | Line | |
---|
[42dcae7] | 1 | #include "fstream.h" |
---|
[a0d9f94] | 2 | |
---|
| 3 | forall( type T ) |
---|
| 4 | T identity( T t ) { |
---|
| 5 | return t; |
---|
| 6 | } |
---|
| 7 | |
---|
| 8 | int main() { |
---|
[42dcae7] | 9 | ofstream *sout = ofstream_stdout(); |
---|
| 10 | char c = 'a'; |
---|
| 11 | sout << c << ' ' << identity( c ) << '\n'; |
---|
| 12 | int i = 5; |
---|
| 13 | sout << i << ' ' << identity( i ) << '\n'; |
---|
| 14 | double d = 3.2; |
---|
| 15 | sout << d << ' ' << identity( d ) << '\n'; |
---|
[a0d9f94] | 16 | } |
---|
[42dcae7] | 17 | |
---|
| 18 | // Local Variables: // |
---|
| 19 | // compile-command: "../../bin/cfa identity.c fstream.o iostream.o" // |
---|
| 20 | // End: // |
---|
Note: See
TracBrowser
for help on using the repository browser.