Ignore:
Timestamp:
Nov 25, 2014, 9:16:10 AM (10 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
Children:
3848e0e
Parents:
d11f789
Message:

re-inserted remove and reorder hoisted aggregate, fixed example programs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • translator/examples/identity.c

    rd11f789 r42dcae7  
    1 extern "C" {
    2     int printf( const char *fmt, ... );
    3 }
     1#include "fstream.h"
    42
    53forall( type T )
     
    97
    108int main() {
    11     printf( "result of identity of 5 is %d\n", identity( 5 ) );
    12     return 0;
     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';
    1316}
     17
     18// Local Variables: //
     19// compile-command: "../../bin/cfa identity.c fstream.o iostream.o" //
     20// End: //
Note: See TracChangeset for help on using the changeset viewer.