aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-decl.c
diff options
context:
space:
mode:
authorMichael Meissner <meissner@linux.vnet.ibm.com>2011-10-11 19:55:09 +0000
committerMichael Meissner <meissner@gcc.gnu.org>2011-10-11 19:55:09 +0000
commite79983f458034c3061645a4c4ff83c9c4d9019b9 (patch)
tree304b794b6f6f0af1f79b00f4166b897337141fac /gcc/c-decl.c
parentf0286f957326b588ba6f49d1fed0c14c19033830 (diff)
downloadgcc-e79983f458034c3061645a4c4ff83c9c4d9019b9.zip
gcc-e79983f458034c3061645a4c4ff83c9c4d9019b9.tar.gz
gcc-e79983f458034c3061645a4c4ff83c9c4d9019b9.tar.bz2
Convert standard builtin functions from being arrays to using a functional interface
From-SVN: r179820
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r--gcc/c-decl.c28
1 files changed, 16 insertions, 12 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index cb58d32..7af70f0 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -2372,17 +2372,21 @@ merge_decls (tree newdecl, tree olddecl, tree newtype, tree oldtype)
{
C_DECL_BUILTIN_PROTOTYPE (newdecl) = 0;
if (DECL_BUILT_IN_CLASS (newdecl) == BUILT_IN_NORMAL)
- switch (DECL_FUNCTION_CODE (newdecl))
- {
- /* If a compatible prototype of these builtin functions
- is seen, assume the runtime implements it with the
- expected semantics. */
- case BUILT_IN_STPCPY:
- implicit_built_in_decls[DECL_FUNCTION_CODE (newdecl)]
- = built_in_decls[DECL_FUNCTION_CODE (newdecl)];
- default:
- break;
- }
+ {
+ enum built_in_function fncode = DECL_FUNCTION_CODE (newdecl);
+ switch (fncode)
+ {
+ /* If a compatible prototype of these builtin functions
+ is seen, assume the runtime implements it with the
+ expected semantics. */
+ case BUILT_IN_STPCPY:
+ if (builtin_decl_explicit_p (fncode))
+ set_builtin_decl_implicit_p (fncode, true);
+ break;
+ default:
+ break;
+ }
+ }
}
else
C_DECL_BUILTIN_PROTOTYPE (newdecl)
@@ -4338,7 +4342,7 @@ finish_decl (tree decl, location_t init_loc, tree init,
}
/* If this is a function and an assembler name is specified, reset DECL_RTL
- so we can give it its new name. Also, update built_in_decls if it
+ so we can give it its new name. Also, update builtin_decl if it
was a normal built-in. */
if (TREE_CODE (decl) == FUNCTION_DECL && asmspec)
{