params->quick_push (expr_addr);
params->quick_push (tmp_addr);
params->quick_push (seq_cst);
- func_call = build_function_call_vec (loc, vNULL, fndecl, params, NULL);
+ func_call = c_build_function_call_vec (loc, vNULL, fndecl, params, NULL);
/* EXPR is always read. */
mark_exp_read (exp.value);
vec_alloc (v, list_length (params));
for (; params; params = TREE_CHAIN (params))
v->quick_push (TREE_VALUE (params));
- ret = build_function_call_vec (loc, vNULL, function, v, NULL);
+ ret = c_build_function_call_vec (loc, vNULL, function, v, NULL);
vec_free (v);
return ret;
}
/* Convert anything with function type to a pointer-to-function. */
if (TREE_CODE (function) == FUNCTION_DECL)
{
- /* Implement type-directed function overloading for builtins.
- resolve_overloaded_builtin and targetm.resolve_overloaded_builtin
- handle all the type checking. The result is a complete expression
- that implements this function call. */
- tem = resolve_overloaded_builtin (loc, function, params);
- if (tem)
- return tem;
-
name = DECL_NAME (function);
if (flag_tm)
}
return require_complete_type (result);
}
+
+/* Like build_function_call_vec, but call also resolve_overloaded_builtin. */
+
+tree
+c_build_function_call_vec (location_t loc, vec<location_t> arg_loc,
+ tree function, vec<tree, va_gc> *params,
+ vec<tree, va_gc> *origtypes)
+{
+ /* Strip NON_LVALUE_EXPRs, etc., since we aren't using as an lvalue. */
+ STRIP_TYPE_NOPS (function);
+
+ /* Convert anything with function type to a pointer-to-function. */
+ if (TREE_CODE (function) == FUNCTION_DECL)
+ {
+ /* Implement type-directed function overloading for builtins.
+ resolve_overloaded_builtin and targetm.resolve_overloaded_builtin
+ handle all the type checking. The result is a complete expression
+ that implements this function call. */
+ tree tem = resolve_overloaded_builtin (loc, function, params);
+ if (tem)
+ return tem;
+ }
+ return build_function_call_vec (loc, arg_loc, function, params, origtypes);
+}
\f
/* Convert the argument expressions in the vector VALUES
to the types in the list TYPELIST.
params->quick_push (lhs_addr);
params->quick_push (rhs);
params->quick_push (seq_cst);
- func_call = build_function_call_vec (loc, vNULL, fndecl, params, NULL);
+ func_call = c_build_function_call_vec (loc, vNULL, fndecl, params, NULL);
add_stmt (func_call);
/* Finish the compound statement. */
params->quick_push (lhs_addr);
params->quick_push (old_addr);
params->quick_push (seq_cst);
- func_call = build_function_call_vec (loc, vNULL, fndecl, params, NULL);
+ func_call = c_build_function_call_vec (loc, vNULL, fndecl, params, NULL);
add_stmt (func_call);
params->truncate (0);
params->quick_push (integer_zero_node);
params->quick_push (seq_cst);
params->quick_push (seq_cst);
- func_call = build_function_call_vec (loc, vNULL, fndecl, params, NULL);
+ func_call = c_build_function_call_vec (loc, vNULL, fndecl, params, NULL);
goto_stmt = build1 (GOTO_EXPR, void_type_node, done_decl);
SET_EXPR_LOCATION (goto_stmt, loc);