bitmap.c (debug_bitmap_file): Merge uses of HOST_PTR_PRINTF with adjacent stdio calls.
gcc: * bitmap.c (debug_bitmap_file): Merge uses of HOST_PTR_PRINTF with adjacent stdio calls. * c-decl.c (c_print_identifier): Likewise. * mips-tfile.c (write_varray, write_object, allocate_cluster): Likewise. * print-rtl.c (print_rtx): Likewise. * print-tree.c (print_node_brief, print_node): Likewise. * system.h (HOST_PTR_PRINTF): Ensure we have a literal string. * configure.in (AC_COMPILE_CHECK_SIZEOF): Check for `void *'. * config.in, configure: Regenerated. cp: * decl.c (print_binding_level, print_other_binding_stack, print_binding_stack): Merge uses of HOST_PTR_PRINTF with adjacent stdio calls. * ptree.c (cxx_print_decl, cxx_print_binding): Likewise. From-SVN: r69061
This commit is contained in:
parent
afeeac3f88
commit
75b6f3fd3a
13 changed files with 410 additions and 386 deletions
|
@ -1,3 +1,16 @@
|
|||
2003-07-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||
|
||||
* bitmap.c (debug_bitmap_file): Merge uses of HOST_PTR_PRINTF with
|
||||
adjacent stdio calls.
|
||||
* c-decl.c (c_print_identifier): Likewise.
|
||||
* mips-tfile.c (write_varray, write_object, allocate_cluster): Likewise.
|
||||
* print-rtl.c (print_rtx): Likewise.
|
||||
* print-tree.c (print_node_brief, print_node): Likewise.
|
||||
* system.h (HOST_PTR_PRINTF): Ensure we have a literal string.
|
||||
|
||||
* configure.in (AC_COMPILE_CHECK_SIZEOF): Check for `void *'.
|
||||
* config.in, configure: Regenerated.
|
||||
|
||||
2003-07-07 Roger Sayle <roger@eyesopen.com>
|
||||
|
||||
PR target/10979
|
||||
|
|
18
gcc/bitmap.c
18
gcc/bitmap.c
|
@ -728,23 +728,17 @@ debug_bitmap_file (FILE *file, bitmap head)
|
|||
{
|
||||
bitmap_element *ptr;
|
||||
|
||||
fprintf (file, "\nfirst = ");
|
||||
fprintf (file, HOST_PTR_PRINTF, (void *) head->first);
|
||||
fprintf (file, " current = ");
|
||||
fprintf (file, HOST_PTR_PRINTF, (void *) head->current);
|
||||
fprintf (file, " indx = %u\n", head->indx);
|
||||
fprintf (file, "\nfirst = " HOST_PTR_PRINTF
|
||||
" current = " HOST_PTR_PRINTF " indx = %u\n",
|
||||
(void *) head->first, (void *) head->current, head->indx);
|
||||
|
||||
for (ptr = head->first; ptr; ptr = ptr->next)
|
||||
{
|
||||
unsigned int i, j, col = 26;
|
||||
|
||||
fprintf (file, "\t");
|
||||
fprintf (file, HOST_PTR_PRINTF, (void *) ptr);
|
||||
fprintf (file, " next = ");
|
||||
fprintf (file, HOST_PTR_PRINTF, (void *) ptr->next);
|
||||
fprintf (file, " prev = ");
|
||||
fprintf (file, HOST_PTR_PRINTF, (void *) ptr->prev);
|
||||
fprintf (file, " indx = %u\n\t\tbits = {", ptr->indx);
|
||||
fprintf (file, "\t" HOST_PTR_PRINTF " next = " HOST_PTR_PRINTF
|
||||
" prev = " HOST_PTR_PRINTF " indx = %u\n\t\tbits = {",
|
||||
(void*) ptr, (void*) ptr->next, (void*) ptr->prev, ptr->indx);
|
||||
|
||||
for (i = 0; i < BITMAP_ELEMENT_WORDS; i++)
|
||||
for (j = 0; j < BITMAP_WORD_BITS; j++)
|
||||
|
|
|
@ -305,9 +305,8 @@ c_print_identifier (FILE *file, tree node, int indent)
|
|||
{
|
||||
tree rid = ridpointers[C_RID_CODE (node)];
|
||||
indent_to (file, indent + 4);
|
||||
fprintf (file, "rid ");
|
||||
fprintf (file, HOST_PTR_PRINTF, (void *)rid);
|
||||
fprintf (file, " \"%s\"", IDENTIFIER_POINTER (rid));
|
||||
fprintf (file, "rid " HOST_PTR_PRINTF " \"%s\"",
|
||||
(void *) rid, IDENTIFIER_POINTER (rid));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* config.in. Generated automatically from configure.in by autoheader 2.13. */
|
||||
/* config.in. Generated automatically from configure.in by autoheader. */
|
||||
|
||||
/* Define if using alloca.c. */
|
||||
#undef C_ALLOCA
|
||||
|
@ -285,6 +285,9 @@
|
|||
/* Define if the `_Bool' type is built-in. */
|
||||
#undef HAVE__BOOL
|
||||
|
||||
/* The number of bytes in type void * */
|
||||
#undef SIZEOF_VOID_P
|
||||
|
||||
/* The number of bytes in type short */
|
||||
#undef SIZEOF_SHORT
|
||||
|
||||
|
|
611
gcc/configure
vendored
611
gcc/configure
vendored
File diff suppressed because it is too large
Load diff
|
@ -249,6 +249,7 @@ gcc_AC_C_LONG_LONG
|
|||
gcc_AC_C__BOOL
|
||||
|
||||
# sizeof(char) is 1 by definition.
|
||||
AC_COMPILE_CHECK_SIZEOF(void *)
|
||||
AC_COMPILE_CHECK_SIZEOF(short)
|
||||
AC_COMPILE_CHECK_SIZEOF(int)
|
||||
AC_COMPILE_CHECK_SIZEOF(long)
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
2003-07-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||
|
||||
* decl.c (print_binding_level, print_other_binding_stack,
|
||||
print_binding_stack): Merge uses of HOST_PTR_PRINTF with adjacent
|
||||
stdio calls.
|
||||
* ptree.c (cxx_print_decl, cxx_print_binding): Likewise.
|
||||
|
||||
2003-07-07 Andreas Jaeger <aj@suse.de>
|
||||
|
||||
* friend.c: Convert to ISO C90 prototypes.
|
||||
|
|
|
@ -1900,8 +1900,7 @@ print_binding_level (struct cp_binding_level* lvl)
|
|||
{
|
||||
tree t;
|
||||
int i = 0, len;
|
||||
fprintf (stderr, " blocks=");
|
||||
fprintf (stderr, HOST_PTR_PRINTF, (void *) lvl->blocks);
|
||||
fprintf (stderr, " blocks=" HOST_PTR_PRINTF, (void *) lvl->blocks);
|
||||
if (lvl->tag_transparent)
|
||||
fprintf (stderr, " tag-transparent");
|
||||
if (lvl->more_cleanups_ok)
|
||||
|
@ -1974,9 +1973,7 @@ print_other_binding_stack (struct cp_binding_level *stack)
|
|||
struct cp_binding_level *level;
|
||||
for (level = stack; !global_scope_p (level); level = level->level_chain)
|
||||
{
|
||||
fprintf (stderr, "binding level ");
|
||||
fprintf (stderr, HOST_PTR_PRINTF, (void *) level);
|
||||
fprintf (stderr, "\n");
|
||||
fprintf (stderr, "binding level " HOST_PTR_PRINTF "\n", (void *) level);
|
||||
print_binding_level (level);
|
||||
}
|
||||
}
|
||||
|
@ -1985,14 +1982,11 @@ void
|
|||
print_binding_stack (void)
|
||||
{
|
||||
struct cp_binding_level *b;
|
||||
fprintf (stderr, "current_binding_level=");
|
||||
fprintf (stderr, HOST_PTR_PRINTF, (void *) current_binding_level);
|
||||
fprintf (stderr, "\nclass_binding_level=");
|
||||
fprintf (stderr, HOST_PTR_PRINTF, (void *) class_binding_level);
|
||||
fprintf (stderr, "\nNAMESPACE_LEVEL (global_namespace)=");
|
||||
fprintf (stderr, HOST_PTR_PRINTF,
|
||||
fprintf (stderr, "current_binding_level=" HOST_PTR_PRINTF
|
||||
"\nclass_binding_level=" HOST_PTR_PRINTF
|
||||
"\nNAMESPACE_LEVEL (global_namespace)=" HOST_PTR_PRINTF "\n",
|
||||
(void *) current_binding_level, (void *) class_binding_level,
|
||||
(void *) NAMESPACE_LEVEL (global_namespace));
|
||||
fprintf (stderr, "\n");
|
||||
if (class_binding_level)
|
||||
{
|
||||
for (b = class_binding_level; b; b = b->level_chain)
|
||||
|
|
|
@ -46,22 +46,16 @@ cxx_print_decl (FILE *file, tree node, int indent)
|
|||
indent_to (file, indent + 3);
|
||||
if (TREE_CODE (node) == FUNCTION_DECL
|
||||
&& DECL_PENDING_INLINE_INFO (node))
|
||||
{
|
||||
fprintf (file, " pending-inline-info ");
|
||||
fprintf (file, HOST_PTR_PRINTF, (void *) DECL_PENDING_INLINE_INFO (node));
|
||||
}
|
||||
fprintf (file, " pending-inline-info " HOST_PTR_PRINTF,
|
||||
(void *) DECL_PENDING_INLINE_INFO (node));
|
||||
if (TREE_CODE (node) == TYPE_DECL
|
||||
&& DECL_SORTED_FIELDS (node))
|
||||
{
|
||||
fprintf (file, " sorted-fields ");
|
||||
fprintf (file, HOST_PTR_PRINTF, (void *) DECL_SORTED_FIELDS (node));
|
||||
}
|
||||
fprintf (file, " sorted-fields " HOST_PTR_PRINTF,
|
||||
(void *) DECL_SORTED_FIELDS (node));
|
||||
if ((TREE_CODE (node) == FUNCTION_DECL || TREE_CODE (node) == VAR_DECL)
|
||||
&& DECL_TEMPLATE_INFO (node))
|
||||
{
|
||||
fprintf (file, " template-info ");
|
||||
fprintf (file, HOST_PTR_PRINTF, (void *) DECL_TEMPLATE_INFO (node));
|
||||
}
|
||||
fprintf (file, " template-info " HOST_PTR_PRINTF,
|
||||
(void *) DECL_TEMPLATE_INFO (node));
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -155,9 +149,8 @@ cxx_print_type (FILE *file, tree node, int indent)
|
|||
static void
|
||||
cxx_print_binding (FILE *stream, cxx_binding *binding, const char *prefix)
|
||||
{
|
||||
fprintf (stream, "%s <", prefix);
|
||||
fprintf (stream, HOST_PTR_PRINTF, (char *) binding);
|
||||
fprintf (stream, ">");
|
||||
fprintf (stream, "%s <" HOST_PTR_PRINTF ">",
|
||||
prefix, (void *) binding);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -3981,12 +3981,10 @@ write_varray (varray_t *vp, /* virtual array */
|
|||
return;
|
||||
|
||||
if (debug)
|
||||
{
|
||||
fputs ("\twarray\tvp = ", stderr);
|
||||
fprintf (stderr, HOST_PTR_PRINTF, (void *) vp);
|
||||
fprintf (stderr, ", offset = %7lu, size = %7lu, %s\n",
|
||||
(unsigned long) offset, vp->num_allocated * vp->object_size, str);
|
||||
}
|
||||
fprintf (stderr, "\twarray\tvp = " HOST_PTR_PRINTF
|
||||
", offset = %7lu, size = %7lu, %s\n",
|
||||
(void *) vp, (unsigned long) offset,
|
||||
vp->num_allocated * vp->object_size, str);
|
||||
|
||||
if (file_offset != (unsigned long) offset
|
||||
&& fseek (object_stream, (long) offset, SEEK_SET) < 0)
|
||||
|
@ -4023,12 +4021,10 @@ write_object (void)
|
|||
off_t offset;
|
||||
|
||||
if (debug)
|
||||
{
|
||||
fputs ("\n\twrite\tvp = ", stderr);
|
||||
fprintf (stderr, HOST_PTR_PRINTF, (void *) &symbolic_header);
|
||||
fprintf (stderr, ", offset = %7u, size = %7lu, %s\n",
|
||||
0, (unsigned long) sizeof (symbolic_header), "symbolic header");
|
||||
}
|
||||
fprintf (stderr, "\n\twrite\tvp = " HOST_PTR_PRINTF
|
||||
", offset = %7u, size = %7lu, %s\n",
|
||||
(void *) &symbolic_header, 0,
|
||||
(unsigned long) sizeof (symbolic_header), "symbolic header");
|
||||
|
||||
sys_write = fwrite (&symbolic_header,
|
||||
1,
|
||||
|
@ -4056,13 +4052,10 @@ write_object (void)
|
|||
pfatal_with_name (object_name);
|
||||
|
||||
if (debug)
|
||||
{
|
||||
fputs ("\twrite\tvp = ", stderr);
|
||||
fprintf (stderr, HOST_PTR_PRINTF, (void *) &orig_linenum);
|
||||
fprintf (stderr, ", offset = %7lu, size = %7lu, %s\n",
|
||||
(long) symbolic_header.cbLineOffset,
|
||||
(long) symbolic_header.cbLine, "Line numbers");
|
||||
}
|
||||
fprintf (stderr, "\twrite\tvp = " HOST_PTR_PRINTF
|
||||
", offset = %7lu, size = %7lu, %s\n",
|
||||
(void *) &orig_linenum, (long) symbolic_header.cbLineOffset,
|
||||
(long) symbolic_header.cbLine, "Line numbers");
|
||||
|
||||
sys_write = fwrite (orig_linenum,
|
||||
1,
|
||||
|
@ -4091,13 +4084,10 @@ write_object (void)
|
|||
pfatal_with_name (object_name);
|
||||
|
||||
if (debug)
|
||||
{
|
||||
fputs ("\twrite\tvp = ", stderr);
|
||||
fprintf (stderr, HOST_PTR_PRINTF, (void *) &orig_opt_syms);
|
||||
fprintf (stderr, ", offset = %7lu, size = %7lu, %s\n",
|
||||
(long) symbolic_header.cbOptOffset,
|
||||
num_write, "Optimizer symbols");
|
||||
}
|
||||
fprintf (stderr, "\twrite\tvp = " HOST_PTR_PRINTF
|
||||
", offset = %7lu, size = %7lu, %s\n",
|
||||
(void *) &orig_opt_syms, (long) symbolic_header.cbOptOffset,
|
||||
num_write, "Optimizer symbols");
|
||||
|
||||
sys_write = fwrite (orig_opt_syms,
|
||||
1,
|
||||
|
@ -4183,13 +4173,10 @@ write_object (void)
|
|||
file_ptr = file_ptr->next_file)
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
fputs ("\twrite\tvp = ", stderr);
|
||||
fprintf (stderr, HOST_PTR_PRINTF, (void *) &file_ptr->fdr);
|
||||
fprintf (stderr, ", offset = %7lu, size = %7lu, %s\n",
|
||||
file_offset, (unsigned long) sizeof (FDR),
|
||||
"File header");
|
||||
}
|
||||
fprintf (stderr, "\twrite\tvp = " HOST_PTR_PRINTF
|
||||
", offset = %7lu, size = %7lu, %s\n",
|
||||
(void *) &file_ptr->fdr, file_offset,
|
||||
(unsigned long) sizeof (FDR), "File header");
|
||||
|
||||
sys_write = fwrite (&file_ptr->fdr,
|
||||
1,
|
||||
|
@ -4219,13 +4206,10 @@ write_object (void)
|
|||
pfatal_with_name (object_name);
|
||||
|
||||
if (debug)
|
||||
{
|
||||
fputs ("\twrite\tvp = ", stderr);
|
||||
fprintf (stderr, HOST_PTR_PRINTF, (void *) &orig_rfds);
|
||||
fprintf (stderr, ", offset = %7lu, size = %7lu, %s\n",
|
||||
(long) symbolic_header.cbRfdOffset,
|
||||
num_write, "Relative file descriptors");
|
||||
}
|
||||
fprintf (stderr, "\twrite\tvp = " HOST_PTR_PRINTF
|
||||
", offset = %7lu, size = %7lu, %s\n",
|
||||
(void *) &orig_rfds, (long) symbolic_header.cbRfdOffset,
|
||||
num_write, "Relative file descriptors");
|
||||
|
||||
sys_write = fwrite (orig_rfds,
|
||||
1,
|
||||
|
@ -5016,12 +5000,8 @@ allocate_cluster (Size_t npages)
|
|||
pfatal_with_name ("allocate_cluster");
|
||||
|
||||
if (debug > 3)
|
||||
{
|
||||
fprintf (stderr, "\talloc\tnpages = %lu, value = ",
|
||||
(unsigned long) npages);
|
||||
fprintf (stderr, HOST_PTR_PRINTF, (void *) ptr);
|
||||
fputs ("\n", stderr);
|
||||
}
|
||||
fprintf (stderr, "\talloc\tnpages = %lu, value = " HOST_PTR_PRINTF "\n",
|
||||
(unsigned long) npages, (void *) ptr);
|
||||
|
||||
return ptr;
|
||||
}
|
||||
|
|
|
@ -501,8 +501,7 @@ print_rtx (rtx in_rtx)
|
|||
break;
|
||||
|
||||
case 't':
|
||||
putc (' ', outfile);
|
||||
fprintf (outfile, HOST_PTR_PRINTF, (char *) XTREE (in_rtx, i));
|
||||
fprintf (outfile, " " HOST_PTR_PRINTF, (void *) XTREE (in_rtx, i));
|
||||
break;
|
||||
|
||||
case '*':
|
||||
|
|
|
@ -72,8 +72,8 @@ print_node_brief (FILE *file, const char *prefix, tree node, int indent)
|
|||
name if any. */
|
||||
if (indent > 0)
|
||||
fprintf (file, " ");
|
||||
fprintf (file, "%s <%s ", prefix, tree_code_name[(int) TREE_CODE (node)]);
|
||||
fprintf (file, HOST_PTR_PRINTF, (char *) node);
|
||||
fprintf (file, "%s <%s " HOST_PTR_PRINTF,
|
||||
prefix, tree_code_name[(int) TREE_CODE (node)], (char *) node);
|
||||
|
||||
if (class == 'd')
|
||||
{
|
||||
|
@ -209,8 +209,8 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
|
|||
indent_to (file, indent);
|
||||
|
||||
/* Print the slot this node is in, and its code, and address. */
|
||||
fprintf (file, "%s <%s ", prefix, tree_code_name[(int) TREE_CODE (node)]);
|
||||
fprintf (file, HOST_PTR_PRINTF, (char *) node);
|
||||
fprintf (file, "%s <%s " HOST_PTR_PRINTF,
|
||||
prefix, tree_code_name[(int) TREE_CODE (node)], (void *) node);
|
||||
|
||||
/* Print the name, if any. */
|
||||
if (class == 'd')
|
||||
|
@ -445,8 +445,8 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
|
|||
&& DECL_SAVED_INSNS (node) != 0)
|
||||
{
|
||||
indent_to (file, indent + 4);
|
||||
fprintf (file, "saved-insns ");
|
||||
fprintf (file, HOST_PTR_PRINTF, (char *) DECL_SAVED_INSNS (node));
|
||||
fprintf (file, "saved-insns " HOST_PTR_PRINTF,
|
||||
(void *) DECL_SAVED_INSNS (node));
|
||||
}
|
||||
|
||||
/* Print the decl chain only if decl is at second level. */
|
||||
|
|
|
@ -446,10 +446,12 @@ extern void abort (void);
|
|||
#ifndef HOST_PTR_PRINTF
|
||||
# ifdef HAVE_PRINTF_PTR
|
||||
# define HOST_PTR_PRINTF "%p"
|
||||
# elif SIZEOF_INT == SIZEOF_VOID_P
|
||||
# define HOST_PTR_PRINTF "%x"
|
||||
# elif SIZEOF_LONG == SIZEOF_VOID_P
|
||||
# define HOST_PTR_PRINTF "%lx"
|
||||
# else
|
||||
# define HOST_PTR_PRINTF \
|
||||
(sizeof (int) == sizeof (char *) ? "%x" \
|
||||
: sizeof (long) == sizeof (char *) ? "%lx" : "%llx")
|
||||
# define HOST_PTR_PRINTF "%llx"
|
||||
# endif
|
||||
#endif /* ! HOST_PTR_PRINTF */
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue