calls.c (expand_call): Don't confuse member functions named realloc...
authorMark Mitchell <mmitchell@usa.net>
Fri, 6 Feb 1998 00:39:51 +0000 (00:39 +0000)
committerJeff Law <law@gcc.gnu.org>
Fri, 6 Feb 1998 00:39:51 +0000 (17:39 -0700)
        * calls.c (expand_call): Don't confuse member functions named
        realloc, setjmp, and so forth with the standard library
        functions of the same names.

From-SVN: r17684

gcc/ChangeLog
gcc/calls.c

index 5e0eb824829a84baa9a4716a3ca7123e7c5ba85c..c8a718f411a62784a24d93e257c71242cb6f10b6 100644 (file)
@@ -1,3 +1,9 @@
+1998-02-02  Mark Mitchell  <mmitchell@usa.net>
+
+       * calls.c (expand_call): Don't confuse member functions named
+       realloc, setjmp, and so forth with the standard library
+       functions of the same names.
+
 Thu Feb  5 21:59:49 1998  Jeffrey A Law  (law@cygnus.com)
 
        * stmt.c (expand_asm_operands): Correctly identify asm statements
index cf6c3df70dc5a98b7c422c19e2d0d67d0c6562c9..786d9b50920d55bea803245f608dab82cd6e3b4f 100644 (file)
@@ -851,7 +851,11 @@ expand_call (exp, target, ignore)
   is_longjmp = 0;
   is_malloc = 0;
 
-  if (name != 0 && IDENTIFIER_LENGTH (DECL_NAME (fndecl)) <= 15)
+  if (name != 0 && IDENTIFIER_LENGTH (DECL_NAME (fndecl)) <= 15
+      /* 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 *tname = name;