From db182819ae7148811986380a66e0ca13762672a5 Mon Sep 17 00:00:00 2001 From: Dale Weiler Date: Sat, 23 Nov 2013 10:58:03 -0500 Subject: [PATCH] Guard against nullfunc --- intrin.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/intrin.c b/intrin.c index d642d30..3fa0d70 100644 --- a/intrin.c +++ b/intrin.c @@ -902,12 +902,11 @@ static ast_expression *intrin_func_self(intrin_t *intrin, const char *name, cons if ((find = intrin_func_try(intrin, offsetof(intrin_func_t, alias), name))) return find; - if (from) + if (from) { intrin_error(intrin, "need function `%s', compiler depends on it for `__builtin_%s'", name, from); - else - intrin_error(intrin, "need function `%s', compiler depends on it", name); - - return intrin_func(intrin, "#nullfunc"); + return intrin_func_self(intrin, "#nullfunc", NULL); + } + return NULL; } ast_expression *intrin_func(intrin_t *intrin, const char *name) { -- 2.39.2