types.c
// Apply default argument promotions & decay arrays
Apply default argument promotions & decay arrays
Apply default argument promotions & decay arrays
Type *apply_default_function_call_argument_promotions(Type *type) {
    if (type->type < TYPE_INT) {
        type = new_type(TYPE_INT);
        if (type->is_unsigned) type->is_unsigned = 1;
    }
    else if (type->type == TYPE_FLOAT)
        type = new_type(TYPE_DOUBLE);
    else if (type->type == TYPE_ARRAY)
        type = decay_array_to_pointer(type);
    return type;
}
Type * apply_default_function_call_argument_promotions ( Type * type ) { if ( type -> type < TYPE_INT ) { type = new_type ( TYPE_INT ) ; if ( type -> is_unsigned ) type -> is_unsigned = 1 ; } else if ( type -> type == TYPE_FLOAT ) type = new_type ( TYPE_DOUBLE ) ; else if ( type -> type == TYPE_ARRAY ) type = decay_array_to_pointer ( type ) ; return type ; }
Apply default argument promotions & decay arrays
Apply default argument promotions & decay arrays