From: Mark Mitchell Date: Sun, 5 Dec 1999 17:53:14 +0000 (+0000) Subject: tree.h (special_function_p): Declare. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3a8c995be7629b05f71e5e0d0afb1bd4e7bb6176;p=gcc.git tree.h (special_function_p): Declare. * tree.h (special_function_p): Declare. * calls.c (special_function_p): Make it global. Don't take `name' as a parameter. Fix typo in 1999-11-28 change. (expand_cal): Adjust. From-SVN: r30788 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 68125046a58..8a785a34a11 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +1999-12-05 Mark Mitchell + + * tree.h (special_function_p): Declare. + * calls.c (special_function_p): Make it global. Don't take `name' + as a parameter. Fix typo in 1999-11-28 change. + (expand_cal): Adjust. + 1999-12-04 Mark Mitchell * tree.def (EXPR_WITH_FILE_LOCATION): Fix comment formatting. diff --git a/gcc/calls.c b/gcc/calls.c index 361c8b78be6..40b359ded67 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -134,8 +134,6 @@ static int calls_function_1 PROTO ((tree, int)); static void emit_call_1 PROTO ((rtx, tree, tree, HOST_WIDE_INT, HOST_WIDE_INT, HOST_WIDE_INT, rtx, rtx, int, rtx, int)); -static void special_function_p PROTO ((char *, tree, int *, int *, - int *, int *)); static void precompute_register_parameters PROTO ((int, struct arg_data *, int *)); static void store_one_arg PROTO ((struct arg_data *, rtx, int, int, @@ -534,10 +532,9 @@ emit_call_1 (funexp, fndecl, funtype, stack_size, rounded_stack_size, Set MAY_BE_ALLOCA for any memory allocation function that might allocate space from the stack such as alloca. */ -static void -special_function_p (name, fndecl, returns_twice, is_longjmp, +void +special_function_p (fndecl, returns_twice, is_longjmp, is_malloc, may_be_alloca) - char *name; tree fndecl; int *returns_twice; int *is_longjmp; @@ -551,14 +548,15 @@ special_function_p (name, fndecl, returns_twice, is_longjmp, /* The function decl may have the `malloc' attribute. */ *is_malloc = fndecl && DECL_IS_MALLOC (fndecl); - if (! is_malloc - && name != 0 + if (! *is_malloc + && fndecl && DECL_NAME (fndecl) && IDENTIFIER_LENGTH (DECL_NAME (fndecl)) <= 17 /* Exclude functions not at the file scope, or not `extern', since they are not the magic functions we would otherwise think they are. */ && DECL_CONTEXT (fndecl) == NULL_TREE && TREE_PUBLIC (fndecl)) { + char *name = IDENTIFIER_POINTER (DECL_NAME (fndecl)); char *tname = name; /* We assume that alloca will always be called by name. It @@ -1880,7 +1878,7 @@ expand_call (exp, target, ignore) /* See if this is a call to a function that can return more than once or a call to longjmp or malloc. */ - special_function_p (name, fndecl, &returns_twice, &is_longjmp, + special_function_p (fndecl, &returns_twice, &is_longjmp, &is_malloc, &may_be_alloca); if (may_be_alloca) diff --git a/gcc/tree.h b/gcc/tree.h index ee726684203..7b0653c343c 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -2405,6 +2405,10 @@ extern struct rtx_def *emit_line_note_after PROTO ((char *, int, extern struct rtx_def *emit_line_note PROTO ((char *, int)); extern struct rtx_def *emit_line_note_force PROTO ((char *, int)); +/* In calls.c */ +extern void special_function_p PROTO ((tree, int *, int *, + int *, int *)); + /* In c-typeck.c */ extern int mark_addressable PROTO ((tree)); extern void incomplete_type_error PROTO ((tree, tree));