summaryrefslogtreecommitdiff
path: root/gcc/langhooks.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/langhooks.c')
-rw-r--r--gcc/langhooks.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/langhooks.c b/gcc/langhooks.c
index 196413792da..fa9b8dd3aca 100644
--- a/gcc/langhooks.c
+++ b/gcc/langhooks.c
@@ -530,9 +530,10 @@ add_builtin_function_common (const char *name,
DECL_EXTERNAL (decl) = 1;
DECL_BUILT_IN_CLASS (decl) = cl;
- DECL_FUNCTION_CODE (decl) = -1;
- gcc_assert (DECL_FUNCTION_CODE (decl) >= function_code);
- DECL_FUNCTION_CODE (decl) = function_code;
+ DECL_FUNCTION_CODE (decl) = (enum built_in_function) function_code;
+
+ /* DECL_FUNCTION_CODE is a bitfield; verify that the value fits. */
+ gcc_assert (DECL_FUNCTION_CODE (decl) == function_code);
if (library_name)
{