This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

about the 'for' statement


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;
  }




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]