aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Mitchell <mmitchell@usa.net>1998-02-06 00:39:51 +0000
committerJeff Law <law@gcc.gnu.org>1998-02-05 17:39:51 -0700
commit259620a822f977a298dfa1a1e24f1d082b949038 (patch)
tree647d71df1e9bbc74f905ca9936c90daa8ba48eae
parentc26046c25121c0a77a4c42bc6b51aa278a660980 (diff)
downloadgcc-259620a822f977a298dfa1a1e24f1d082b949038.zip
gcc-259620a822f977a298dfa1a1e24f1d082b949038.tar.gz
gcc-259620a822f977a298dfa1a1e24f1d082b949038.tar.bz2
calls.c (expand_call): Don't confuse member functions named realloc...
* 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
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/calls.c6
2 files changed, 11 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5e0eb82..c8a718f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/calls.c b/gcc/calls.c
index cf6c3df..786d9b5 100644
--- a/gcc/calls.c
+++ b/gcc/calls.c
@@ -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;