This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[mainline] PATCH to cp/error.c
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: gcc-patches at gcc dot gnu dot org
- Date: 29 Jun 2003 12:57:00 +0200
- Subject: [mainline] PATCH to cp/error.c
- Organization: Integrable Solutions
This removes redundant code in cp/error.c.
Bootstrapped and regtested on an i686-pc-linux.
Applied.
-- Gaby
2003-06-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
* error.c (print_integer): Remove.
(dump_type_suffix): Adjust.
(dump_expr): Likewise.
Index: error.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/error.c,v
retrieving revision 1.210
diff -p -r1.210 error.c
*** error.c 28 Jun 2003 19:02:32 -0000 1.210
--- error.c 29 Jun 2003 10:54:05 -0000
*************** static void cp_print_error_function (dia
*** 111,117 ****
static bool cp_printer (output_buffer *, text_info *);
static void print_non_consecutive_character (output_buffer *, int);
- static void print_integer (output_buffer *, HOST_WIDE_INT);
static tree locate_error (const char *, va_list);
static location_t location_of (tree);
--- 111,116 ----
*************** dump_type_suffix (tree t, int flags)
*** 725,731 ****
if (TYPE_DOMAIN (t))
{
if (host_integerp (TYPE_MAX_VALUE (TYPE_DOMAIN (t)), 0))
! print_integer
(scratch_buffer,
tree_low_cst (TYPE_MAX_VALUE (TYPE_DOMAIN (t)), 0) + 1);
else if (TREE_CODE (TYPE_MAX_VALUE (TYPE_DOMAIN (t))) == MINUS_EXPR)
--- 724,730 ----
if (TYPE_DOMAIN (t))
{
if (host_integerp (TYPE_MAX_VALUE (TYPE_DOMAIN (t)), 0))
! output_host_wide_integer
(scratch_buffer,
tree_low_cst (TYPE_MAX_VALUE (TYPE_DOMAIN (t)), 0) + 1);
else if (TREE_CODE (TYPE_MAX_VALUE (TYPE_DOMAIN (t))) == MINUS_EXPR)
*************** dump_expr (tree t, int flags)
*** 1477,1483 ****
output_add_string (scratch_buffer, digit_buffer);
}
else
! print_integer (scratch_buffer, TREE_INT_CST_LOW (t));
}
}
break;
--- 1476,1482 ----
output_add_string (scratch_buffer, digit_buffer);
}
else
! output_host_wide_integer (scratch_buffer, TREE_INT_CST_LOW (t));
}
}
break;
*************** cp_printer (output_buffer *buffer, text_
*** 2500,2512 ****
#undef next_tcode
#undef next_lang
#undef next_int
- }
-
- static void
- print_integer (output_buffer *buffer, HOST_WIDE_INT i)
- {
- sprintf (digit_buffer, HOST_WIDE_INT_PRINT_DEC, (HOST_WIDE_INT) i);
- output_add_string (buffer, digit_buffer);
}
static void
--- 2499,2504 ----