aboutsummaryrefslogtreecommitdiffstats
path: root/symbol.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@evo.osdl.org>2004-04-21 13:12:42 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-07 21:01:39 -0700
commit4f973d1fd74a64577d420226d879fd44c58d6890 (patch)
tree0db0d8522e78b078d3b8c69904f31b4b1436dd60 /symbol.c
parent347a96fec7749e71927f1eb8c0ce76fd7490a7d2 (diff)
downloadsparse-4f973d1fd74a64577d420226d879fd44c58d6890.tar.gz
Make the builtin functions be more type-correct, to
allow all the regular function sanity checks to be run. Remove duplicate symbol_call evaluation for direct function calls, and move it to after all the sanity checks.
Diffstat (limited to 'symbol.c')
-rw-r--r--symbol.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/symbol.c b/symbol.c
index 460a5ad2..0720e73c 100644
--- a/symbol.c
+++ b/symbol.c
@@ -433,8 +433,9 @@ struct symbol_op constant_p_op = {
/*
* Builtin functions
*/
+static struct symbol builtin_fn_type = { .type = SYM_FN };
struct sym_init eval_init_table[] = {
- { "__builtin_constant_p", &int_type, MOD_TOPLEVEL, &constant_p_op },
+ { "__builtin_constant_p", &builtin_fn_type, MOD_TOPLEVEL, &constant_p_op },
{ NULL, NULL, 0 }
};
@@ -561,6 +562,7 @@ void init_symbols(void)
sym->ctype.modifiers = ptr->modifiers;
}
+ builtin_fn_type.variadic = 1;
for (ptr = eval_init_table; ptr->name; ptr++) {
struct symbol *sym;
sym = create_symbol(stream, ptr->name, SYM_NODE, NS_SYMBOL);