Hi.

I just pushed a new change to the mob branch
(http://repo.or.cz/w/tinycc.git/commit/433ecdfc9d1402ecf03e710de481e2063ad6de90)
 adding support for C99 for loops a few hours ago.

A simple test program works as expected:
    
--- snip --
#include <stdio.h>
    
int main(int argc, char *argv[]) {
   int k = 5, i = -1, j = -2;
   for (int i = 0, j = 9;
      i < k;
      ++i, j += i)
   {
      printf("%d / %d\n", i, j);
   }
   printf("%d / %d\n", i, j);
   return 0;
}
--- snip --
    
Output:
   
0 / 9
1 / 10
2 / 12
3 / 15
4 / 19
-1 / -2
    
Beware: I merely made some educated guesses as to what some functions
are doing and just copy'n'pasted a few lines of code. Works for me,
YMMV.

Any comments, critics or improvements are welcome.

Cheers,

- Claudio

_______________________________________________
Tinycc-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to