Changeset f1ee72e for src/tests/ShortCircuit.c
- Timestamp:
- Jun 23, 2016, 12:23:00 PM (9 years ago)
- 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, with_gc
- Children:
- 4d3ca1d8
- Parents:
- c2931ea (diff), d56c05d0 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/tests/ShortCircuit.c
rc2931ea rf1ee72e 1 int ?!=?( int, int ); 2 int ?!=?( float, float ); 3 int 0; 4 5 void g( float ); 6 void g( int ); 1 void g( float f ) {} 2 void g( int i ) {} 7 3 8 4 void f( int a ) { … … 14 10 } 15 11 16 //Dummy main 12 void g() { 13 int a; 14 struct { int b; } a; 15 if ( a ) { 16 while ( a ) { 17 int *b; 18 for ( b; a; b ) { 19 } 20 } 21 } 22 } 23 24 #include <fstream> 25 26 struct test_t { 27 int x; 28 }; 29 30 int ?!=?( test_t lhs, int rhs ) { 31 sout | lhs.x | " "; 32 return lhs.x != 0; 33 } 34 35 17 36 int main(int argc, char const *argv[]) 18 37 { 38 test_t true_val, false_val; 39 true_val.x = 1; 40 false_val.x = 0; 41 42 true_val && false_val; 43 sout | endl; 44 45 true_val || false_val; 46 sout | endl; 47 48 false_val && true_val; 49 sout | endl; 50 51 false_val || true_val; 52 sout | endl; 53 19 54 return 0; 20 55 }
Note:
See TracChangeset
for help on using the changeset viewer.