Hello,

same as previous patch, this time for `new'.

Bootstrapped on i386-pc-linux-gnu with all languages enabled.
Committed as pre-approved.


2004-07-25  Bernardo Innocenti  <bernie@develer.com>

	* c-common.c: Rename all identifiers named `new'.
	* c-decl.c: Likewise.
	* gensupport.c: Likewise.
	* simplify-rtx.c: Likewise.
	* c-common.c (disable_builtin_function): Replace a call to xmalloc()
	with XNEW().
	* gensupport.c (alter_output_for_insn): Replace two calls to xmalloc()
	with XNEWVEC().


diff -u -p -r1.525 c-common.c
--- gcc/c-common.c	30 Jun 2004 22:27:59 -0000	1.525
+++ gcc/c-common.c	11 Jul 2004 23:57:01 -0000
@@ -3154,10 +3158,10 @@ disable_builtin_function (const char *na
     error ("cannot disable built-in function `%s'", name);
   else
     {
-      disabled_builtin *new = xmalloc (sizeof (disabled_builtin));
-      new->name = name;
-      new->next = disabled_builtins;
-      disabled_builtins = new;
+      disabled_builtin *n = XNEW (disabled_builtin);
+      n->name = name;
+      n->next = disabled_builtins;
+      disabled_builtins = n;
     }
 }
 
diff -u -p -r1.523 c-decl.c
--- gcc/c-decl.c	1 Jul 2004 01:12:11 -0000	1.523
+++ gcc/c-decl.c	11 Jul 2004 23:57:04 -0000
@@ -1662,43 +1662,43 @@ duplicate_decls (tree newdecl, tree oldd
 }
 
 
-/* Check whether decl-node NEW shadows an existing declaration.  */
+/* Check whether decl-node DECL shadows an existing declaration.  */
 static void
-warn_if_shadowing (tree new)
+warn_if_shadowing (tree decl)
 {
   struct c_binding *b;
 
   /* Shadow warnings wanted?  */
   if (!warn_shadow
       /* No shadow warnings for internally generated vars.  */
-      || DECL_IS_BUILTIN (new)
+      || DECL_IS_BUILTIN (decl)
       /* No shadow warnings for vars made for inlining.  */
-      || DECL_FROM_INLINE (new)
+      || DECL_FROM_INLINE (decl)
       /* Don't warn about the parm names in function declarator
 	 within a function declarator.  It would be nice to avoid
 	 warning in any function declarator in a declaration, as
 	 opposed to a definition, but there is no way to tell
 	 it's not a definition at this point.  */
-      || (TREE_CODE (new) == PARM_DECL && current_scope->outer->parm_flag))
+      || (TREE_CODE (decl) == PARM_DECL && current_scope->outer->parm_flag))
     return;
 
   /* Is anything being shadowed?  Do not be confused by a second binding
      to the same decl in the externals scope.  */
-  for (b = I_SYMBOL_BINDING (DECL_NAME (new)); b; b = b->shadowed)
-    if (b->decl && b->decl != new && b->contour != external_scope)
+  for (b = I_SYMBOL_BINDING (DECL_NAME (decl)); b; b = b->shadowed)
+    if (b->decl && b->decl != decl && b->contour != external_scope)
       {
 	tree old = b->decl;
 
 	if (TREE_CODE (old) == PARM_DECL)
-	  warning ("%Jdeclaration of '%D' shadows a parameter", new, new);
+	  warning ("%Jdeclaration of '%D' shadows a parameter", decl, decl);
 	else if (DECL_FILE_SCOPE_P (old))
 	  warning ("%Jdeclaration of '%D' shadows a global declaration",
-		   new, new);
+		   decl, decl);
 	else if (TREE_CODE (old) == FUNCTION_DECL && DECL_BUILT_IN (old))
 	  warning ("%Jdeclaration of '%D' shadows a built-in function",
-		   new, new);
+		   decl, decl);
 	else
-	  warning ("%Jdeclaration of '%D' shadows a previous local", new, new);
+	  warning ("%Jdeclaration of '%D' shadows a previous local", decl, decl);
 
 	if (TREE_CODE (old) != FUNCTION_DECL || !DECL_BUILT_IN (old))
 	  warning ("%Jshadowed declaration is here", old);
diff -u -p -r1.49 gensupport.c
--- gcc/gensupport.c	30 May 2004 18:32:26 -0000	1.49
+++ gcc/gensupport.c	11 Jul 2004 23:58:05 -0000
@@ -675,12 +675,12 @@ alter_test_for_insn (struct queue_elem *
    adjusted string.  */
 
 static char *
-shift_output_template (char *new, const char *old, int disp)
+shift_output_template (char *dest, const char *old, int disp)
 {
   while (*old)
     {
       char c = *old++;
-      *new++ = c;
+      *dest++ = c;
       if (c == '%')
 	{
 	  c = *old++;
@@ -688,14 +688,14 @@ shift_output_template (char *new, const 
 	    c += disp;
 	  else if (ISALPHA (c))
 	    {
-	      *new++ = c;
+	      *dest++ = c;
 	      c = *old++ + disp;
 	    }
-	  *new++ = c;
+	  *dest++ = c;
 	}
     }
 
-  return new;
+  return dest;
 }
 
 static const char *
@@ -704,7 +704,7 @@ alter_output_for_insn (struct queue_elem
 		       int alt, int max_op)
 {
   const char *ce_out, *insn_out;
-  char *new, *p;
+  char *result, *p;
   size_t len, ce_len, insn_len;
 
   /* ??? Could coordinate with genoutput to not duplicate code here.  */
@@ -724,7 +724,7 @@ alter_output_for_insn (struct queue_elem
   if (*insn_out == '@')
     {
       len = (ce_len + 1) * alt + insn_len + 1;
-      p = new = xmalloc (len);
+      p = result = XNEWVEC(char, len);
 
       do
 	{
@@ -748,14 +748,14 @@ alter_output_for_insn (struct queue_elem
   else
     {
       len = ce_len + 1 + insn_len + 1;
-      new = xmalloc (len);
+      result = XNEWVEC (char, len);
 
-      p = shift_output_template (new, ce_out, max_op);
+      p = shift_output_template (result, ce_out, max_op);
       *p++ = ' ';
       memcpy (p, insn_out, insn_len + 1);
     }
 
-  return new;
+  return result;
 }
 
 /* Replicate insns as appropriate for the given DEFINE_COND_EXEC.  */
diff -u -p -r1.195 simplify-rtx.c
--- gcc/simplify-rtx.c	30 Jun 2004 10:09:50 -0000	1.195
+++ gcc/simplify-rtx.c	11 Jul 2004 23:58:48 -0000
@@ -240,38 +240,38 @@ simplify_gen_relational (enum rtx_code c
   return gen_rtx_fmt_ee (code, mode, op0, op1);
 }
 
-/* Replace all occurrences of OLD in X with NEW and try to simplify the
+/* Replace all occurrences of OLDX in X with NEWX and try to simplify the
    resulting RTX.  Return a new RTX which is as simplified as possible.  */
 
 rtx
-simplify_replace_rtx (rtx x, rtx old, rtx new)
+simplify_replace_rtx (rtx x, rtx oldx, rtx newx)
 {
   enum rtx_code code = GET_CODE (x);
   enum machine_mode mode = GET_MODE (x);
   enum machine_mode op_mode;
   rtx op0, op1, op2;
 
-  /* If X is OLD, return NEW.  Otherwise, if this is an expression, try
+  /* If X is OLDX, return NEWX.  Otherwise, if this is an expression, try
      to build a new expression substituting recursively.  If we can't do
      anything, return our input.  */
 
-  if (x == old)
-    return new;
+  if (x == oldx)
+    return newx;
 
   switch (GET_RTX_CLASS (code))
     {
     case RTX_UNARY:
       op0 = XEXP (x, 0);
       op_mode = GET_MODE (op0);
-      op0 = simplify_replace_rtx (op0, old, new);
+      op0 = simplify_replace_rtx (op0, oldx, newx);
       if (op0 == XEXP (x, 0))
 	return x;
       return simplify_gen_unary (code, mode, op0, op_mode);
 
     case RTX_BIN_ARITH:
     case RTX_COMM_ARITH:
-      op0 = simplify_replace_rtx (XEXP (x, 0), old, new);
-      op1 = simplify_replace_rtx (XEXP (x, 1), old, new);
+      op0 = simplify_replace_rtx (XEXP (x, 0), oldx, newx);
+      op1 = simplify_replace_rtx (XEXP (x, 1), oldx, newx);
       if (op0 == XEXP (x, 0) && op1 == XEXP (x, 1))
 	return x;
       return simplify_gen_binary (code, mode, op0, op1);
@@ -281,8 +281,8 @@ simplify_replace_rtx (rtx x, rtx old, rt
       op0 = XEXP (x, 0);
       op1 = XEXP (x, 1);
       op_mode = GET_MODE (op0) != VOIDmode ? GET_MODE (op0) : GET_MODE (op1);
-      op0 = simplify_replace_rtx (op0, old, new);
-      op1 = simplify_replace_rtx (op1, old, new);
+      op0 = simplify_replace_rtx (op0, oldx, newx);
+      op1 = simplify_replace_rtx (op1, oldx, newx);
       if (op0 == XEXP (x, 0) && op1 == XEXP (x, 1))
 	return x;
       return simplify_gen_relational (code, mode, op_mode, op0, op1);
@@ -291,9 +291,9 @@ simplify_replace_rtx (rtx x, rtx old, rt
     case RTX_BITFIELD_OPS:
       op0 = XEXP (x, 0);
       op_mode = GET_MODE (op0);
-      op0 = simplify_replace_rtx (op0, old, new);
-      op1 = simplify_replace_rtx (XEXP (x, 1), old, new);
-      op2 = simplify_replace_rtx (XEXP (x, 2), old, new);
+      op0 = simplify_replace_rtx (op0, oldx, newx);
+      op1 = simplify_replace_rtx (XEXP (x, 1), oldx, newx);
+      op2 = simplify_replace_rtx (XEXP (x, 2), oldx, newx);
       if (op0 == XEXP (x, 0) && op1 == XEXP (x, 1) && op2 == XEXP (x, 2))
 	return x;
       if (op_mode == VOIDmode)
@@ -304,7 +304,7 @@ simplify_replace_rtx (rtx x, rtx old, rt
       /* The only case we try to handle is a SUBREG.  */
       if (code == SUBREG)
 	{
-	  op0 = simplify_replace_rtx (SUBREG_REG (x), old, new);
+	  op0 = simplify_replace_rtx (SUBREG_REG (x), oldx, newx);
 	  if (op0 == SUBREG_REG (x))
 	    return x;
 	  op0 = simplify_gen_subreg (GET_MODE (x), op0,
@@ -317,15 +317,15 @@ simplify_replace_rtx (rtx x, rtx old, rt
     case RTX_OBJ:
       if (code == MEM)
 	{
-	  op0 = simplify_replace_rtx (XEXP (x, 0), old, new);
+	  op0 = simplify_replace_rtx (XEXP (x, 0), oldx, newx);
 	  if (op0 == XEXP (x, 0))
 	    return x;
 	  return replace_equiv_address_nv (x, op0);
 	}
       else if (code == LO_SUM)
 	{
-	  op0 = simplify_replace_rtx (XEXP (x, 0), old, new);
-	  op1 = simplify_replace_rtx (XEXP (x, 1), old, new);
+	  op0 = simplify_replace_rtx (XEXP (x, 0), oldx, newx);
+	  op1 = simplify_replace_rtx (XEXP (x, 1), oldx, newx);
 
 	  /* (lo_sum (high x) x) -> x  */
 	  if (GET_CODE (op0) == HIGH && rtx_equal_p (XEXP (op0, 0), op1))
@@ -337,8 +337,8 @@ simplify_replace_rtx (rtx x, rtx old, rt
 	}
       else if (code == REG)
 	{
-	  if (REG_P (old) && REGNO (x) == REGNO (old))
-	    return new;
+	  if (REG_P (oldx) && REGNO (x) == REGNO (oldx))
+	    return newx;
 	}
       break;
 
@@ -2791,9 +2791,9 @@ simplify_relational_operation_1 (enum rt
 	    }
 	  else if (code == EQ)
 	    {
-	      enum rtx_code new = reversed_comparison_code (op0, NULL_RTX);
-	      if (new != UNKNOWN)
-	        return simplify_gen_relational (new, mode, VOIDmode,
+	      enum rtx_code new_code = reversed_comparison_code (op0, NULL_RTX);
+	      if (new_code != UNKNOWN)
+	        return simplify_gen_relational (new_code, mode, VOIDmode,
 					        XEXP (op0, 0), XEXP (op0, 1));
 	    }
 	}
@@ -3600,7 +3600,7 @@ simplify_subreg (enum machine_mode outer
     {
       enum machine_mode innermostmode = GET_MODE (SUBREG_REG (op));
       int final_offset = byte + SUBREG_BYTE (op);
-      rtx new;
+      rtx newx;
 
       if (outermode == innermostmode
 	  && byte == 0 && SUBREG_BYTE (op) == 0)
@@ -3657,11 +3657,11 @@ simplify_subreg (enum machine_mode outer
 	}
 
       /* Recurse for further possible simplifications.  */
-      new = simplify_subreg (outermode, SUBREG_REG (op),
+      newx = simplify_subreg (outermode, SUBREG_REG (op),
 			     GET_MODE (SUBREG_REG (op)),
 			     final_offset);
-      if (new)
-	return new;
+      if (newx)
+	return newx;
       return gen_rtx_SUBREG (outermode, SUBREG_REG (op), final_offset);
     }
 
@@ -3790,7 +3790,7 @@ rtx
 simplify_gen_subreg (enum machine_mode outermode, rtx op,
 		     enum machine_mode innermode, unsigned int byte)
 {
-  rtx new;
+  rtx newx;
   /* Little bit of sanity checking.  */
   if (innermode == VOIDmode || outermode == VOIDmode
       || innermode == BLKmode || outermode == BLKmode)
@@ -3807,9 +3807,9 @@ simplify_gen_subreg (enum machine_mode o
   if (GET_CODE (op) == QUEUED)
     return NULL_RTX;
 
-  new = simplify_subreg (outermode, op, innermode, byte);
-  if (new)
-    return new;
+  newx = simplify_subreg (outermode, op, innermode, byte);
+  if (newx)
+    return newx;
 
   if (GET_CODE (op) == SUBREG || GET_MODE (op) == VOIDmode)
     return NULL_RTX;
