stage4/generate_c/generate_c_il.cc
changeset 211 5249d313ff7c
parent 210 8387cac2aba6
child 216 136d6ae70745
equal deleted inserted replaced
210:8387cac2aba6 211:5249d313ff7c
   511   /* Declare the default variable, that will store the result of the IL operations... */
   511   /* Declare the default variable, that will store the result of the IL operations... */
   512   s4o.print(s4o.indent_spaces);
   512   s4o.print(s4o.indent_spaces);
   513   s4o.print(IL_DEFVAR_T);
   513   s4o.print(IL_DEFVAR_T);
   514   s4o.print(" ");
   514   s4o.print(" ");
   515   this->default_variable_name.accept(*this);
   515   this->default_variable_name.accept(*this);
   516   s4o.print(";\n\n");
   516   s4o.print(";\n");
       
   517   s4o.print(s4o.indent_spaces);
       
   518   print_backup_variable();
       
   519   s4o.print(".INTvar = 0;\n\n");
   517 
   520 
   518   print_list(symbol, s4o.indent_spaces, ";\n" + s4o.indent_spaces, ";\n");
   521   print_list(symbol, s4o.indent_spaces, ";\n" + s4o.indent_spaces, ";\n");
       
   522 
       
   523   /* label not used by at least one goto result in a warning.
       
   524    * To work around this we introduce the useless goto
       
   525    * to humour the compiler...
       
   526    */
       
   527   s4o.print("\n");
       
   528   s4o.print(s4o.indent_spaces);
       
   529   s4o.print("/* to humour the compiler, we insert a goto */\n");
       
   530   s4o.print(s4o.indent_spaces);
       
   531   s4o.print("goto ");
       
   532   s4o.print(END_LABEL);
       
   533   s4o.print(";\n");
   519 
   534 
   520   /* write the label marking the end of the code block */
   535   /* write the label marking the end of the code block */
   521   /* please see the comment before the RET_operator_c visitor for details... */
   536   /* please see the comment before the RET_operator_c visitor for details... */
   522   s4o.print("\n");
   537   s4o.print("\n");
   523   s4o.print(s4o.indent_spaces);
   538   s4o.print(s4o.indent_spaces);