aclocal.m4 (gcc_AC_FUNC_PRINTF_PTR): Delete.

* aclocal.m4 (gcc_AC_FUNC_PRINTF_PTR): Delete.
	* configure.ac: Don't call gcc_AC_FUNC_PRINTF_PTR.
	* system.h (HOST_PTR_PRINTF): Don't define, poison it.

	* bitmap.c, c-decl.c, config/i386/i386-interix.h,
	config/iq2000/iq2000.c, mips-tfile.c, print-rtl.c, print-tree.c:
	Delete HOST_PTR_PRINTF.

	* configure, config.in: Regenerate.

cp:
	* name-lookup.c, ptree.c: Delete HOST_PTR_PRINTF.

From-SVN: r103135
This commit is contained in:
Kaveh R. Ghazi 2005-08-16 00:13:53 +00:00 committed by Kaveh Ghazi
parent 54778d9cf5
commit 06145cb9b4
16 changed files with 46 additions and 138 deletions

View File

@ -1,3 +1,16 @@
2005-08-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* aclocal.m4 (gcc_AC_FUNC_PRINTF_PTR): Delete.
* configure.ac: Don't call gcc_AC_FUNC_PRINTF_PTR.
* system.h (HOST_PTR_PRINTF): Don't define, poison it.
* bitmap.c, c-decl.c, config/i386/i386-interix.h,
config/iq2000/iq2000.c, mips-tfile.c, print-rtl.c, print-tree.c:
Delete HOST_PTR_PRINTF.
* configure, config.in: Regenerate.
2005-08-15 David Edelsohn <edelsohn@gnu.org>
* config/rs6000/rs6000.md (QHSI): New mode macro.

21
gcc/aclocal.m4 vendored
View File

@ -89,27 +89,6 @@ make_compare_target=$gcc_cv_prog_cmp_skip
AC_SUBST(make_compare_target)
])
dnl See if the printf functions in libc support %p in format strings.
AC_DEFUN([gcc_AC_FUNC_PRINTF_PTR],
[AC_CACHE_CHECK(whether the printf functions support %p,
gcc_cv_func_printf_ptr,
[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>
int main()
{
char buf[64];
char *p = buf, *q = NULL;
sprintf(buf, "%p", p);
sscanf(buf, "%p", &q);
return (p != q);
}]])], gcc_cv_func_printf_ptr=yes, gcc_cv_func_printf_ptr=no,
gcc_cv_func_printf_ptr=no)
rm -f core core.* *.core])
if test $gcc_cv_func_printf_ptr = yes ; then
AC_DEFINE(HAVE_PRINTF_PTR, 1, [Define if printf supports "%p".])
fi
])
dnl See if symbolic links work and if not, try to substitute either hard links or simple copy.
AC_DEFUN([gcc_AC_PROG_LN_S],
[AC_MSG_CHECKING(whether ln -s works)

View File

@ -1217,16 +1217,14 @@ debug_bitmap_file (FILE *file, bitmap head)
{
bitmap_element *ptr;
fprintf (file, "\nfirst = " HOST_PTR_PRINTF
" current = " HOST_PTR_PRINTF " indx = %u\n",
fprintf (file, "\nfirst = %p current = %p 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" HOST_PTR_PRINTF " next = " HOST_PTR_PRINTF
" prev = " HOST_PTR_PRINTF " indx = %u\n\t\tbits = {",
fprintf (file, "\t%p next = %p prev = %p indx = %u\n\t\tbits = {",
(void*) ptr, (void*) ptr->next, (void*) ptr->prev, ptr->indx);
for (i = 0; i < BITMAP_ELEMENT_WORDS; i++)

View File

@ -466,7 +466,7 @@ c_print_identifier (FILE *file, tree node, int indent)
{
tree rid = ridpointers[C_RID_CODE (node)];
indent_to (file, indent + 4);
fprintf (file, "rid " HOST_PTR_PRINTF " \"%s\"",
fprintf (file, "rid %p \"%s\"",
(void *) rid, IDENTIFIER_POINTER (rid));
}
}

View File

@ -958,12 +958,6 @@
#endif
/* Define if printf supports "%p". */
#ifndef USED_FOR_TARGET
#undef HAVE_PRINTF_PTR
#endif
/* Define to 1 if you have the `putchar_unlocked' function. */
#ifndef USED_FOR_TARGET
#undef HAVE_PUTCHAR_UNLOCKED

View File

@ -286,7 +286,6 @@ do \
} \
while (0)
#define HOST_PTR_PRINTF "%p"
#define HOST_PTR_AS_INT unsigned long
#define PCC_BITFIELD_TYPE_MATTERS 1

View File

@ -1124,7 +1124,7 @@ function_arg_advance (CUMULATIVE_ARGS *cum, enum machine_mode mode, tree type,
"function_adv({gp reg found = %d, arg # = %2d, words = %2d}, %4s, ",
cum->gp_reg_found, cum->arg_number, cum->arg_words,
GET_MODE_NAME (mode));
fprintf (stderr, HOST_PTR_PRINTF, (const PTR) type);
fprintf (stderr, "%p", (void *) type);
fprintf (stderr, ", %d )\n\n", named);
}
@ -1197,7 +1197,7 @@ function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode, tree type,
"function_arg( {gp reg found = %d, arg # = %2d, words = %2d}, %4s, ",
cum->gp_reg_found, cum->arg_number, cum->arg_words,
GET_MODE_NAME (mode));
fprintf (stderr, HOST_PTR_PRINTF, (const PTR) type);
fprintf (stderr, "%p", (void *) type);
fprintf (stderr, ", %d ) = ", named);
}

59
gcc/configure vendored
View File

@ -9489,65 +9489,6 @@ else
fi
echo "$as_me:$LINENO: checking whether the printf functions support %p" >&5
echo $ECHO_N "checking whether the printf functions support %p... $ECHO_C" >&6
if test "${gcc_cv_func_printf_ptr+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test "$cross_compiling" = yes; then
gcc_cv_func_printf_ptr=no
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <stdio.h>
int main()
{
char buf[64];
char *p = buf, *q = NULL;
sprintf(buf, "%p", p);
sscanf(buf, "%p", &q);
return (p != q);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
gcc_cv_func_printf_ptr=yes
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
gcc_cv_func_printf_ptr=no
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
rm -f core core.* *.core
fi
echo "$as_me:$LINENO: result: $gcc_cv_func_printf_ptr" >&5
echo "${ECHO_T}$gcc_cv_func_printf_ptr" >&6
if test $gcc_cv_func_printf_ptr = yes ; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_PRINTF_PTR 1
_ACEOF
fi
echo "$as_me:$LINENO: checking for sys/mman.h" >&5
echo $ECHO_N "checking for sys/mman.h... $ECHO_C" >&6

View File

@ -1044,7 +1044,6 @@ else
fi
AC_SUBST(TARGET_GETGROUPS_T)
gcc_AC_FUNC_PRINTF_PTR
gcc_AC_FUNC_MMAP_BLACKLIST
case "${host}" in

View File

@ -1,3 +1,7 @@
2005-08-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* name-lookup.c, ptree.c: Delete HOST_PTR_PRINTF.
2005-08-15 Fariborz Jahanian <fjahanian@apple.com>
* cp-tree.h (can_convert_arg, fn_type_unification): New argument.

View File

@ -1484,7 +1484,7 @@ print_binding_level (struct cp_binding_level* lvl)
{
tree t;
int i = 0, len;
fprintf (stderr, " blocks=" HOST_PTR_PRINTF, (void *) lvl->blocks);
fprintf (stderr, " blocks=%p", (void *) lvl->blocks);
if (lvl->more_cleanups_ok)
fprintf (stderr, " more-cleanups-ok");
if (lvl->have_cleanups)
@ -1549,7 +1549,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 " HOST_PTR_PRINTF "\n", (void *) level);
fprintf (stderr, "binding level %p\n", (void *) level);
print_binding_level (level);
}
}
@ -1558,9 +1558,9 @@ void
print_binding_stack (void)
{
struct cp_binding_level *b;
fprintf (stderr, "current_binding_level=" HOST_PTR_PRINTF
"\nclass_binding_level=" HOST_PTR_PRINTF
"\nNAMESPACE_LEVEL (global_namespace)=" HOST_PTR_PRINTF "\n",
fprintf (stderr, "current_binding_level=%p\n"
"class_binding_level=%p\n"
"NAMESPACE_LEVEL (global_namespace)=%p\n",
(void *) current_binding_level, (void *) class_binding_level,
(void *) NAMESPACE_LEVEL (global_namespace));
if (class_binding_level)

View File

@ -46,15 +46,15 @@ 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 " HOST_PTR_PRINTF,
fprintf (file, " pending-inline-info %p",
(void *) DECL_PENDING_INLINE_INFO (node));
if (TREE_CODE (node) == TYPE_DECL
&& DECL_SORTED_FIELDS (node))
fprintf (file, " sorted-fields " HOST_PTR_PRINTF,
fprintf (file, " sorted-fields %p",
(void *) DECL_SORTED_FIELDS (node));
if ((TREE_CODE (node) == FUNCTION_DECL || TREE_CODE (node) == VAR_DECL)
&& DECL_TEMPLATE_INFO (node))
fprintf (file, " template-info " HOST_PTR_PRINTF,
fprintf (file, " template-info %p",
(void *) DECL_TEMPLATE_INFO (node));
}
@ -142,7 +142,7 @@ 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 <" HOST_PTR_PRINTF ">",
fprintf (stream, "%s <%p>",
prefix, (void *) binding);
}

View File

@ -3980,8 +3980,7 @@ write_varray (varray_t *vp, /* virtual array */
return;
if (debug)
fprintf (stderr, "\twarray\tvp = " HOST_PTR_PRINTF
", offset = %7lu, size = %7lu, %s\n",
fprintf (stderr, "\twarray\tvp = %p, offset = %7lu, size = %7lu, %s\n",
(void *) vp, (unsigned long) offset,
vp->num_allocated * vp->object_size, str);
@ -4020,8 +4019,7 @@ write_object (void)
off_t offset;
if (debug)
fprintf (stderr, "\n\twrite\tvp = " HOST_PTR_PRINTF
", offset = %7u, size = %7lu, %s\n",
fprintf (stderr, "\n\twrite\tvp = %p, offset = %7u, size = %7lu, %s\n",
(void *) &symbolic_header, 0,
(unsigned long) sizeof (symbolic_header), "symbolic header");
@ -4051,8 +4049,7 @@ write_object (void)
pfatal_with_name (object_name);
if (debug)
fprintf (stderr, "\twrite\tvp = " HOST_PTR_PRINTF
", offset = %7lu, size = %7lu, %s\n",
fprintf (stderr, "\twrite\tvp = %p, offset = %7lu, size = %7lu, %s\n",
(void *) &orig_linenum, (long) symbolic_header.cbLineOffset,
(long) symbolic_header.cbLine, "Line numbers");
@ -4083,8 +4080,7 @@ write_object (void)
pfatal_with_name (object_name);
if (debug)
fprintf (stderr, "\twrite\tvp = " HOST_PTR_PRINTF
", offset = %7lu, size = %7lu, %s\n",
fprintf (stderr, "\twrite\tvp = %p, offset = %7lu, size = %7lu, %s\n",
(void *) &orig_opt_syms, (long) symbolic_header.cbOptOffset,
num_write, "Optimizer symbols");
@ -4172,8 +4168,7 @@ write_object (void)
file_ptr = file_ptr->next_file)
{
if (debug)
fprintf (stderr, "\twrite\tvp = " HOST_PTR_PRINTF
", offset = %7lu, size = %7lu, %s\n",
fprintf (stderr, "\twrite\tvp = %p, offset = %7lu, size = %7lu, %s\n",
(void *) &file_ptr->fdr, file_offset,
(unsigned long) sizeof (FDR), "File header");
@ -4205,8 +4200,7 @@ write_object (void)
pfatal_with_name (object_name);
if (debug)
fprintf (stderr, "\twrite\tvp = " HOST_PTR_PRINTF
", offset = %7lu, size = %7lu, %s\n",
fprintf (stderr, "\twrite\tvp = %p, offset = %7lu, size = %7lu, %s\n",
(void *) &orig_rfds, (long) symbolic_header.cbRfdOffset,
num_write, "Relative file descriptors");
@ -4999,7 +4993,7 @@ allocate_cluster (Size_t npages)
pfatal_with_name ("allocate_cluster");
if (debug > 3)
fprintf (stderr, "\talloc\tnpages = %lu, value = " HOST_PTR_PRINTF "\n",
fprintf (stderr, "\talloc\tnpages = %lu, value = %p\n",
(unsigned long) npages, (void *) ptr);
return ptr;

View File

@ -287,7 +287,7 @@ print_rtx (rtx in_rtx)
if (flag_dump_unnumbered)
fprintf (outfile, "#");
else
fprintf (outfile, HOST_PTR_PRINTF,
fprintf (outfile, "%p",
(char *) NOTE_BLOCK (in_rtx));
sawclose = 1;
break;
@ -539,7 +539,7 @@ print_rtx (rtx in_rtx)
break;
case 't':
fprintf (outfile, " " HOST_PTR_PRINTF, (void *) XTREE (in_rtx, i));
fprintf (outfile, " %p", (void *) XTREE (in_rtx, i));
break;
case '*':

View File

@ -73,7 +73,7 @@ print_node_brief (FILE *file, const char *prefix, tree node, int indent)
name if any. */
if (indent > 0)
fprintf (file, " ");
fprintf (file, "%s <%s " HOST_PTR_PRINTF,
fprintf (file, "%s <%s %p",
prefix, tree_code_name[(int) TREE_CODE (node)], (char *) node);
if (class == tcc_declaration)
@ -218,7 +218,7 @@ 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 " HOST_PTR_PRINTF,
fprintf (file, "%s <%s %p",
prefix, tree_code_name[(int) TREE_CODE (node)], (void *) node);
/* Print the name, if any. */
@ -495,7 +495,7 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
&& DECL_STRUCT_FUNCTION (node) != 0)
{
indent_to (file, indent + 4);
fprintf (file, "saved-insns " HOST_PTR_PRINTF,
fprintf (file, "saved-insns %p",
(void *) DECL_STRUCT_FUNCTION (node));
}
@ -755,7 +755,7 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
break;
case STATEMENT_LIST:
fprintf (file, " head " HOST_PTR_PRINTF " tail " HOST_PTR_PRINTF " stmts",
fprintf (file, " head %p tail %p stmts",
(void *) node->stmt_list.head, (void *) node->stmt_list.tail);
{
tree_stmt_iterator i;
@ -763,7 +763,7 @@ print_node (FILE *file, const char *prefix, tree node, int indent)
{
/* Not printing the addresses of the (not-a-tree)
'struct tree_stmt_list_node's. */
fprintf (file, " " HOST_PTR_PRINTF, (void *)tsi_stmt (i));
fprintf (file, " %p", (void *)tsi_stmt (i));
}
fprintf (file, "\n");
for (i = tsi_start (node); !tsi_end_p (i); tsi_next (&i))

View File

@ -511,19 +511,6 @@ extern int vsnprintf(char *, size_t, const char *, va_list);
# define mkdir(a,b) mkdir(a)
#endif
/* Provide a way to print an address via printf. */
#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 "%llx"
# endif
#endif /* ! HOST_PTR_PRINTF */
/* By default, colon separates directories in a path. */
#ifndef PATH_SEPARATOR
#define PATH_SEPARATOR ':'
@ -741,7 +728,7 @@ extern void fancy_abort (const char *, int, const char *) ATTRIBUTE_NORETURN;
TARGET_ESC TARGET_FF TARGET_NEWLINE TARGET_TAB TARGET_VT \
LINK_LIBGCC_SPECIAL DONT_ACCESS_GBLS_AFTER_EPILOGUE \
TARGET_OPTIONS TARGET_SWITCHES EXTRA_CC_MODES FINALIZE_PIC \
PREDICATE_CODES SPECIAL_MODE_PREDICATES
PREDICATE_CODES SPECIAL_MODE_PREDICATES HOST_PTR_PRINTF
/* Hooks that are no longer used. */
#pragma GCC poison LANG_HOOKS_FUNCTION_MARK LANG_HOOKS_FUNCTION_FREE \