about the 'for' statement

Wang Yong wung_y@263.net
Mon Aug 16 00:02:00 GMT 1999


Hi, all
  in gcc, how 'for' statement is translated? 

  for example:

  for (i=1;i++;i<10){
      //some statement here
  }

  If this for statement will be translated to something like this :

  i=1;
l1:
  if (i<10){
        //some statements here
        i++;
        goto l1;
  }

or

  i=1;
l1:
  i++;
  if (i<10){
        //some statements here
        goto l1;
  }





More information about the Gcc mailing list