diff options
Diffstat (limited to 'gcc/c-family/c-common.c')
-rw-r--r-- | gcc/c-family/c-common.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c index 2c5a48916ff..0aa0fefbd7c 100644 --- a/gcc/c-family/c-common.c +++ b/gcc/c-family/c-common.c @@ -5168,15 +5168,14 @@ def_builtin_1 (enum built_in_function fncode, decl = add_builtin_function (name, fntype, fncode, fnclass, (fallback_p ? libname : NULL), fnattrs); + + set_builtin_decl (fncode, decl, implicit_p); + if (both_p && !flag_no_builtin && !builtin_function_disabled_p (libname) && !(nonansi_p && flag_no_nonansi_builtin)) add_builtin_function (libname, libtype, fncode, fnclass, NULL, fnattrs); - - built_in_decls[(int) fncode] = decl; - if (implicit_p) - implicit_built_in_decls[(int) fncode] = decl; } /* Nonzero if the type T promotes to int. This is (nearly) the @@ -9144,11 +9143,13 @@ resolve_overloaded_builtin (location_t loc, tree function, VEC(tree,gc) *params) { int n = sync_resolve_size (function, params); tree new_function, first_param, result; + enum built_in_function fncode; if (n == 0) return error_mark_node; - new_function = built_in_decls[orig_code + exact_log2 (n) + 1]; + fncode = (enum built_in_function)((int)orig_code + exact_log2 (n) + 1); + new_function = builtin_decl_explicit (fncode); if (!sync_resolve_params (function, new_function, params)) return error_mark_node; |