Changes in / [b8116cd:72ae87c]
- Location:
- src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/ExpressionNode.cc
rb8116cd r72ae87c 10 10 // Created On : Sat May 16 13:17:07 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Sep 26 11:23:36201713 // Update Count : 78 012 // Last Modified On : Wed Sep 27 22:51:55 2017 13 // Update Count : 781 14 14 // 15 15 … … 207 207 208 208 assert( 0 <= size && size < 6 ); 209 // Constant type is correct for overload resolving. 209 210 ret = new ConstantExpr( Constant( new BasicType( noQualifiers, kind[Unsigned][size] ), str, v ) ); 210 if ( size < 2 ) {// hh or h, less than int ?211 if ( Unsigned && size < 2 ) { // hh or h, less than int ? 211 212 // int i = -1uh => 65535 not -1, so cast is necessary for unsigned, which unfortunately eliminates warnings for large values. 212 213 ret = new CastExpr( ret, new BasicType( Type::Qualifiers(), kind[Unsigned][size] ) ); -
src/tests/.expect/64/literals.txt
rb8116cd r72ae87c 1252 1252 ((void)(-((long double )0x.0123456789p09))); 1253 1253 ((void)__f__F_c__1('a')); 1254 ((void)__f__F_Sc__1( ((signed char )20)));1254 ((void)__f__F_Sc__1(20)); 1255 1255 ((void)__f__F_Uc__1(((unsigned char )21u))); 1256 ((void)__f__F_s__1( ((signed short int )22)));1256 ((void)__f__F_s__1(22)); 1257 1257 ((void)__f__F_Us__1(((unsigned short int )23u))); 1258 1258 ((void)__f__F_Ul__1(((unsigned long int )24))); -
src/tests/coroutine.c
rb8116cd r72ae87c 10 10 // Created On : Thu Jun 8 07:29:37 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Jun 8 07:37:12201713 // Update Count : 512 // Last Modified On : Sun Sep 17 21:38:15 2017 13 // Update Count : 7 14 14 // 15 15 … … 18 18 19 19 coroutine Fibonacci { 20 int fn; // used for communication20 int fn; // used for communication 21 21 }; 22 22 … … 26 26 27 27 void main( Fibonacci & this ) { 28 int fn1, fn2; // retained between resumes29 this.fn = 0; // case 028 int fn1, fn2; // retained between resumes 29 this.fn = 0; // case 0 30 30 fn1 = this.fn; 31 suspend(); // return tolast resume31 suspend(); // restart last resume 32 32 33 this.fn = 1; // case 1 34 fn2 = fn1; 35 fn1 = this.fn; 36 suspend(); // return to last resume 33 this.fn = 1; // case 1 34 fn2 = fn1; fn1 = this.fn; 35 suspend(); // restart last resume 37 36 38 for ( ;; ) { // general case37 for ( ;; ) { // general case 39 38 this.fn = fn1 + fn2; 40 fn2 = fn1; 41 fn1 = this.fn; 42 suspend(); // return to last resume 39 fn2 = fn1; fn1 = this.fn; 40 suspend(); // restart last resume 43 41 } // for 44 42 } 45 43 46 44 int next( Fibonacci & this ) { 47 resume( this ); // transfer tolast suspend45 resume( this ); // restart last suspend 48 46 return this.fn; 49 47 } … … 52 50 Fibonacci f1, f2; 53 51 for ( int i = 1; i <= 10; i += 1 ) { 54 sout | next( f1 ) | ' ' |next( f2 ) | endl;52 sout | next( f1 ) | next( f2 ) | endl; 55 53 } // for 56 54 } -
src/tests/gmp.c
rb8116cd r72ae87c 10 10 // Created On : Tue Apr 19 08:55:51 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Sep 4 09:51:18201713 // Update Count : 55 012 // Last Modified On : Thu Sep 28 18:33:51 2017 13 // Update Count : 555 14 14 // 15 15 … … 97 97 98 98 sout | "Factorial Numbers" | endl; 99 Int fact; 100 fact = 1; // 1st case 99 Int fact = 1; // 1st case 101 100 sout | (int)0 | fact | endl; 102 101 for ( unsigned int i = 1; i <= 40; i += 1 ) {
Note: See TracChangeset
for help on using the changeset viewer.