aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/evaluate.c
diff options
Diffstat (limited to 'evaluate.c')
-rw-r--r--evaluate.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/evaluate.c b/evaluate.c
index 16e11fe1..43a61169 100644
--- a/evaluate.c
+++ b/evaluate.c
@@ -1787,6 +1787,8 @@ static struct symbol *degenerate(struct expression *expr)
expression_error(expr, "strange non-value function or array");
return &bad_ctype;
}
+ if (ctype->builtin)
+ sparse_error(expr->pos, "taking the address of built-in function '%s'", show_ident(ctype->ident));
*expr = *expr->unop;
ctype = create_pointer(expr, ctype, 1);
expr->ctype = ctype;
@@ -1807,6 +1809,8 @@ static struct symbol *evaluate_addressof(struct expression *expr)
return NULL;
}
ctype = op->ctype;
+ if (ctype->builtin)
+ sparse_error(expr->pos, "taking the address of built-in function '%s'", show_ident(ctype->ident));
*expr = *op->unop;
mark_addressable(expr);