From ad3fd36f73012aa44ee7f55d09a2a2b87ce9dd6e Mon Sep 17 00:00:00 2001 From: "Kaveh R. Ghazi" Date: Tue, 19 Sep 2000 18:19:44 +0000 Subject: builtins.c (is_valid_printf_arglist, [...]): New functions. * builtins.c (is_valid_printf_arglist, expand_builtin_printf): New functions. (expand_builtin_fputs): Set `target' parameter for `expand_expr'. (expand_builtin): Handle BUILT_IN_PUTCHAR, BUILT_IN_PUTS and BUILT_IN_PRINTF. * builtins.def (BUILT_IN_PUTCHAR, BUILT_IN_PUTS, BUILT_IN_PRINTF): New entries. * c-common.c (init_function_format_info): Handle __builtin_printf. Set `check_function_format_ptr'. (c_common_nodes_and_builtins): Set `puts_ftype' and `printf_ftype'. Declare __builtin_putchar, __builtin_puts, __builtin_printf and printf. * tree.c, tree.h (check_function_format_ptr): Declare. testsuite: * g++.old-deja/g++.other/virtual8.C: Declare printf correctly. From-SVN: r36540 --- gcc/tree.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gcc/tree.c') diff --git a/gcc/tree.c b/gcc/tree.c index 3f8d7c6..ef27a78 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -246,6 +246,10 @@ static int next_decl_uid; /* Unique id for next type created. */ static int next_type_uid = 1; +/* Pointer to function to check the format of printf, etc. This is + used by the backend, e.g. builtins.c. */ +void (*check_function_format_ptr) PARAMS ((int *, tree, tree, tree)) = 0; + /* Here is how primitive or already-canonicalized types' hash codes are made. */ #define TYPE_HASH(TYPE) ((unsigned long) (TYPE) & 0777777) -- cgit v1.1