aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>1999-12-05 17:53:14 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>1999-12-05 17:53:14 +0000
commit3a8c995be7629b05f71e5e0d0afb1bd4e7bb6176 (patch)
tree67f47706953450d5e1f4664179fc8384c809f9e3
parente6f696fc9883d36d269592f0a33de5f3a70d59c1 (diff)
downloadgcc-3a8c995be7629b05f71e5e0d0afb1bd4e7bb6176.zip
gcc-3a8c995be7629b05f71e5e0d0afb1bd4e7bb6176.tar.gz
gcc-3a8c995be7629b05f71e5e0d0afb1bd4e7bb6176.tar.bz2
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
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/calls.c14
-rw-r--r--gcc/tree.h4
3 files changed, 17 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 6812504..8a785a3 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+1999-12-05 Mark Mitchell <mark@codesourcery.com>
+
+ * 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 <mark@codesourcery.com>
* tree.def (EXPR_WITH_FILE_LOCATION): Fix comment formatting.
diff --git a/gcc/calls.c b/gcc/calls.c
index 361c8b7..40b359d 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 ee72668..7b0653c 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));