From: John Carr <jfc@mit.edu>
To: egcs@cygnus.com
Subject: C++ new and aliasing
Date: Sat, 25 Apr 1998 16:18:00 -0000 [thread overview]
Message-ID: <199804252043.QAA29621@jfc.> (raw)
This patch fixes a bug in the code which tests whether a call is to
a malloc-like function. (The alias code knows that the return value
of malloc does not alias any other memory.)
Sat Apr 25 16:38:46 1998 John Carr <jfc@mit.edu>
* calls.c (expand_call): Fix code to recognize C++ operator new.
*** calls.c 1998/04/09 00:44:41 1.19
--- calls.c 1998/04/25 20:40:57
*************** expand_call (exp, target, ignore)
*** 901,908 ****
else if (! strcmp (tname, "malloc")
|| ! strcmp (tname, "calloc")
|| ! strcmp (tname, "realloc")
! || ! strcmp (tname, "__builtin_new")
! || ! strcmp (tname, "__builtin_vec_new"))
is_malloc = 1;
}
--- 901,912 ----
else if (! strcmp (tname, "malloc")
|| ! strcmp (tname, "calloc")
|| ! strcmp (tname, "realloc")
! /* Note use of NAME rather than TNAME here. These functions
! are only reserved when preceded with __. */
! || ! strcmp (name, "__vn") /* mangled __builtin_vec_new */
! || ! strcmp (name, "__nw") /* mangled __builtin_new */
! || ! strcmp (name, "__builtin_new")
! || ! strcmp (name, "__builtin_vec_new"))
is_malloc = 1;
}
next reply other threads:[~1998-04-25 16:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-04-25 16:18 John Carr [this message]
1998-04-27 19:48 ` Jim Wilson
1998-04-28 1:54 ` Andreas Schwab
1998-04-28 17:50 ` Jim Wilson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=199804252043.QAA29621@jfc. \
--to=jfc@mit.edu \
--cc=egcs@cygnus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).