PATCH for errfn.c

Mark Mitchell mmitchell@usa.net
Tue Apr 21 18:23:00 GMT 1998


Jeff & John --

  I think you guys made a minor typo when you rewrote cp_thing:
 
  Wed Apr 15 13:20:06 1998  John Carr  <jfc@mit.edu>
			    Jeff Law   <law@cygnus.com>

	  * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
	  than a pointer.

  Here's a patch.  Jason (or Jeff), may I check this in?

-- 
Mark Mitchell <mmitchell@usa.net>
http://home.earthlink.net/~mbmitchell
Consulting Services Available

Tue Apr 21 17:14:04 1998  Mark Mitchell  <mmitchell@usa.net>

	* errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.

Index: errfn.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/errfn.c,v
retrieving revision 1.5
diff -c -p -r1.5 errfn.c
*** errfn.c	1998/04/15 12:22:03	1.5
--- errfn.c	1998/04/22 00:12:03
*************** cp_thing (errfn, atarg1, format, ap)
*** 158,164 ****
  	  if (len > buflen)
  	    {
  	      buflen = len;
! 	      buf = xmalloc (len);
  	    }
  	  sprintf (buf + offset, "%d", va_arg (ap, int));
  	  nargs++;
--- 158,164 ----
  	  if (len > buflen)
  	    {
  	      buflen = len;
! 	      buf = xrealloc (buf, len);
  	    }
  	  sprintf (buf + offset, "%d", va_arg (ap, int));
  	  nargs++;



More information about the Gcc-bugs mailing list