public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* C++ new and aliasing
@ 1998-04-25 16:18 John Carr
  1998-04-27 19:48 ` Jim Wilson
  1998-04-28  1:54 ` Andreas Schwab
  0 siblings, 2 replies; 4+ messages in thread
From: John Carr @ 1998-04-25 16:18 UTC (permalink / raw)
  To: egcs

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;
      }
  

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1998-04-28 17:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-04-25 16:18 C++ new and aliasing John Carr
1998-04-27 19:48 ` Jim Wilson
1998-04-28  1:54 ` Andreas Schwab
1998-04-28 17:50   ` Jim Wilson

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).