stage4/generate_c/generate_c_il.cc
changeset 216 136d6ae70745
parent 211 5249d313ff7c
child 217 f5dfadf5de54
equal deleted inserted replaced
215:15c98c40f6f4 216:136d6ae70745
   710         if (param_value == NULL) {
   710         if (param_value == NULL) {
   711           /* If not, get the default value of this variable's type */
   711           /* If not, get the default value of this variable's type */
   712           param_value = (symbol_c *)param_type->accept(*type_initial_value_c::instance());
   712           param_value = (symbol_c *)param_type->accept(*type_initial_value_c::instance());
   713         }
   713         }
   714         if (param_value == NULL) ERROR;
   714         if (param_value == NULL) ERROR;
   715         if (search_base_type.type_is_subrange(param_type)) {
   715         if (search_expression_type->is_literal_integer_type(param_type) ||
       
   716 			search_expression_type->is_literal_real_type(param_type)) {
       
   717 			if (function_type_suffix == NULL) ERROR;
       
   718 			function_type_suffix->accept(*this);
       
   719 		}
       
   720 		else
       
   721 			param_type->accept(*this);
       
   722 		if (search_base_type.type_is_subrange(param_type)) {
   716           s4o.print("__CHECK_");
   723           s4o.print("__CHECK_");
   717           param_type->accept(*this);
   724           param_type->accept(*this);
   718           s4o.print("(");
   725           s4o.print("(");
   719         }
   726         }
   720         param_value->accept(*this);
   727         param_value->accept(*this);
  1041         if (param_value == NULL) {
  1048         if (param_value == NULL) {
  1042           /* If not, get the default value of this variable's type */
  1049           /* If not, get the default value of this variable's type */
  1043           param_value = (symbol_c *)param_type->accept(*type_initial_value_c::instance());
  1050           param_value = (symbol_c *)param_type->accept(*type_initial_value_c::instance());
  1044         }
  1051         }
  1045         if (param_value == NULL) ERROR;
  1052         if (param_value == NULL) ERROR;
  1046         if (search_base_type.type_is_subrange(param_type)) {
  1053         if (search_expression_type->is_literal_integer_type(param_type) ||
       
  1054 			search_expression_type->is_literal_real_type(param_type)) {
       
  1055 			if (function_type_suffix == NULL) ERROR;
       
  1056 			function_type_suffix->accept(*this);
       
  1057 		}
       
  1058 		else
       
  1059 			param_type->accept(*this);
       
  1060 		if (search_base_type.type_is_subrange(param_type)) {
  1047           s4o.print("__CHECK_");
  1061           s4o.print("__CHECK_");
  1048           param_type->accept(*this);
  1062           param_type->accept(*this);
  1049           s4o.print("(");
  1063           s4o.print("(");
  1050         }
  1064         }
  1051         param_value->accept(*this);
  1065         param_value->accept(*this);