diff -r 30cbae46190d -r 8387cac2aba6 stage4/generate_c/st_code_gen.c --- a/stage4/generate_c/st_code_gen.c Mon Sep 21 12:02:14 2009 +0200 +++ b/stage4/generate_c/st_code_gen.c Mon Sep 21 12:04:15 2009 +0200 @@ -16528,7 +16528,13 @@ } }while(param_value != NULL); - symbol_c * return_type_symbol = last_type_symbol; + symbol_c * return_type_symbol; + if (search_expression_type->is_literal_integer_type(last_type_symbol)) + return_type_symbol = &search_constant_type_c::lint_type_name; + else if (search_expression_type->is_literal_real_type(last_type_symbol)) + return_type_symbol = &search_constant_type_c::lreal_type_name; + else + return_type_symbol = last_type_symbol; function_type_suffix = return_type_symbol; break; @@ -16746,7 +16752,13 @@ } }while(param_value != NULL); - symbol_c * return_type_symbol = last_type_symbol; + symbol_c * return_type_symbol; + if (search_expression_type->is_literal_integer_type(last_type_symbol)) + return_type_symbol = &search_constant_type_c::lint_type_name; + else if (search_expression_type->is_literal_real_type(last_type_symbol)) + return_type_symbol = &search_constant_type_c::lreal_type_name; + else + return_type_symbol = last_type_symbol; function_type_suffix = return_type_symbol; break; @@ -16855,7 +16867,13 @@ if (IN2_type_symbol == NULL) IN2_type_symbol = last_type_symbol; ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) - symbol_c * return_type_symbol = last_type_symbol; + symbol_c * return_type_symbol; + if (search_expression_type->is_literal_integer_type(last_type_symbol)) + return_type_symbol = &search_constant_type_c::lint_type_name; + else if (search_expression_type->is_literal_real_type(last_type_symbol)) + return_type_symbol = &search_constant_type_c::lreal_type_name; + else + return_type_symbol = last_type_symbol; function_type_suffix = return_type_symbol; break; @@ -17118,7 +17136,13 @@ if (IN2_type_symbol == NULL) IN2_type_symbol = last_type_symbol; ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) - symbol_c * return_type_symbol = last_type_symbol; + symbol_c * return_type_symbol; + if (search_expression_type->is_literal_integer_type(last_type_symbol)) + return_type_symbol = &search_constant_type_c::lint_type_name; + else if (search_expression_type->is_literal_real_type(last_type_symbol)) + return_type_symbol = &search_constant_type_c::lreal_type_name; + else + return_type_symbol = last_type_symbol; function_type_suffix = return_type_symbol; break; @@ -17227,7 +17251,13 @@ if (IN2_type_symbol == NULL) IN2_type_symbol = last_type_symbol; ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) - symbol_c * return_type_symbol = last_type_symbol; + symbol_c * return_type_symbol; + if (search_expression_type->is_literal_integer_type(last_type_symbol)) + return_type_symbol = &search_constant_type_c::lint_type_name; + else if (search_expression_type->is_literal_real_type(last_type_symbol)) + return_type_symbol = &search_constant_type_c::lreal_type_name; + else + return_type_symbol = last_type_symbol; function_type_suffix = return_type_symbol; break; @@ -17296,7 +17326,13 @@ if (IN2_type_symbol == NULL) IN2_type_symbol = last_type_symbol; ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) - symbol_c * return_type_symbol = last_type_symbol; + symbol_c * return_type_symbol; + if (search_expression_type->is_literal_integer_type(last_type_symbol)) + return_type_symbol = &search_constant_type_c::lint_type_name; + else if (search_expression_type->is_literal_real_type(last_type_symbol)) + return_type_symbol = &search_constant_type_c::lreal_type_name; + else + return_type_symbol = last_type_symbol; function_type_suffix = IN1_type_symbol; break; @@ -17344,7 +17380,13 @@ if (IN_type_symbol == NULL) IN_type_symbol = last_type_symbol; ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) - symbol_c * return_type_symbol = last_type_symbol; + symbol_c * return_type_symbol; + if (search_expression_type->is_literal_integer_type(last_type_symbol)) + return_type_symbol = &search_constant_type_c::lint_type_name; + else if (search_expression_type->is_literal_real_type(last_type_symbol)) + return_type_symbol = &search_constant_type_c::lreal_type_name; + else + return_type_symbol = last_type_symbol; function_type_suffix = return_type_symbol; break; @@ -17712,7 +17754,11 @@ } }while(param_value != NULL); - symbol_c * return_type_symbol = last_type_symbol; + symbol_c * return_type_symbol; + if (search_expression_type->is_literal_integer_type(last_type_symbol)) + return_type_symbol = &search_constant_type_c::lword_type_name; + else + return_type_symbol = last_type_symbol; function_type_suffix = return_type_symbol; break; @@ -17810,7 +17856,11 @@ } }while(param_value != NULL); - symbol_c * return_type_symbol = last_type_symbol; + symbol_c * return_type_symbol; + if (search_expression_type->is_literal_integer_type(last_type_symbol)) + return_type_symbol = &search_constant_type_c::lword_type_name; + else + return_type_symbol = last_type_symbol; function_type_suffix = return_type_symbol; break; @@ -17908,7 +17958,11 @@ } }while(param_value != NULL); - symbol_c * return_type_symbol = last_type_symbol; + symbol_c * return_type_symbol; + if (search_expression_type->is_literal_integer_type(last_type_symbol)) + return_type_symbol = &search_constant_type_c::lword_type_name; + else + return_type_symbol = last_type_symbol; function_type_suffix = return_type_symbol; break; @@ -18040,7 +18094,13 @@ if (IN1_type_symbol == NULL) IN1_type_symbol = last_type_symbol; ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) - symbol_c * return_type_symbol = last_type_symbol; + symbol_c * return_type_symbol; + if (search_expression_type->is_literal_integer_type(last_type_symbol)) + return_type_symbol = &search_constant_type_c::lint_type_name; + else if (search_expression_type->is_literal_real_type(last_type_symbol)) + return_type_symbol = &search_constant_type_c::lreal_type_name; + else + return_type_symbol = last_type_symbol; function_type_suffix = IN0_type_symbol; break; @@ -18144,7 +18204,13 @@ } }while(param_value != NULL); - symbol_c * return_type_symbol = last_type_symbol; + symbol_c * return_type_symbol; + if (search_expression_type->is_literal_integer_type(last_type_symbol)) + return_type_symbol = &search_constant_type_c::lint_type_name; + else if (search_expression_type->is_literal_real_type(last_type_symbol)) + return_type_symbol = &search_constant_type_c::lreal_type_name; + else + return_type_symbol = last_type_symbol; function_type_suffix = return_type_symbol; break; @@ -18242,7 +18308,13 @@ } }while(param_value != NULL); - symbol_c * return_type_symbol = last_type_symbol; + symbol_c * return_type_symbol; + if (search_expression_type->is_literal_integer_type(last_type_symbol)) + return_type_symbol = &search_constant_type_c::lint_type_name; + else if (search_expression_type->is_literal_real_type(last_type_symbol)) + return_type_symbol = &search_constant_type_c::lreal_type_name; + else + return_type_symbol = last_type_symbol; function_type_suffix = return_type_symbol; break; @@ -18457,7 +18529,13 @@ } }while(param_value != NULL); - symbol_c * return_type_symbol = last_type_symbol; + symbol_c * return_type_symbol; + if (search_expression_type->is_literal_integer_type(last_type_symbol)) + return_type_symbol = &search_constant_type_c::lint_type_name; + else if (search_expression_type->is_literal_real_type(last_type_symbol)) + return_type_symbol = &search_constant_type_c::lreal_type_name; + else + return_type_symbol = last_type_symbol; function_type_suffix = return_type_symbol; break;