tree.h (special_function_p): Declare.
authorMark Mitchell <mark@codesourcery.com>
Sun, 5 Dec 1999 17:53:14 +0000 (17:53 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Sun, 5 Dec 1999 17:53:14 +0000 (17:53 +0000)
* 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

gcc/ChangeLog
gcc/calls.c
gcc/tree.h

index 68125046a584dcb518ef01514d8b154eb4b91bed..8a785a34a11011d5db8578c33646f005c99a476d 100644 (file)
@@ -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.
index 361c8b78be68e6bee04912e1af9b2f1e862d7a62..40b359ded6775a1acfb137b8a900716b962e4d8c 100644 (file)
@@ -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)
index ee726684203c58dbebe7de06d5e4e8c60c57f1e4..7b0653c343cb277b77cdd35755e5c8abc5a4f0dd 100644 (file)
@@ -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));