This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

cp/tree.c



This fixes some type problems in cp/tree.c.  Because it is only
debugging code I took the easier approach of casting to a known type
instead of using the HOST_WIDE_INT printf format macros.

Mon Jun  8 16:46:01 1998  John Carr  <jfc@mit.edu>

	* tree.c (debug_binfo): Make printf format match arguments.

*** tree.c	1998/06/04 11:45:17	1.47
--- tree.c	1998/06/08 20:44:43
*************** debug_binfo (elem)
*** 1250,1258 ****
    unsigned HOST_WIDE_INT n;
    tree virtuals;
  
!   fprintf (stderr, "type \"%s\"; offset = %d\n",
  	   TYPE_NAME_STRING (BINFO_TYPE (elem)),
! 	   TREE_INT_CST_LOW (BINFO_OFFSET (elem)));
    fprintf (stderr, "vtable type:\n");
    debug_tree (BINFO_TYPE (elem));
    if (BINFO_VTABLE (elem))
--- 1250,1258 ----
    unsigned HOST_WIDE_INT n;
    tree virtuals;
  
!   fprintf (stderr, "type \"%s\"; offset = %ld\n",
  	   TYPE_NAME_STRING (BINFO_TYPE (elem)),
! 	   (long) TREE_INT_CST_LOW (BINFO_OFFSET (elem)));
    fprintf (stderr, "vtable type:\n");
    debug_tree (BINFO_TYPE (elem));
    if (BINFO_VTABLE (elem))
*************** debug_binfo (elem)
*** 1267,1275 ****
    while (virtuals)
      {
        tree fndecl = TREE_OPERAND (FNADDR_FROM_VTABLE_ENTRY (TREE_VALUE (virtuals)), 0);
!       fprintf (stderr, "%s [%d =? %d]\n",
  	       IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (fndecl)),
! 	       n, TREE_INT_CST_LOW (DECL_VINDEX (fndecl)));
        ++n;
        virtuals = TREE_CHAIN (virtuals);
      }
--- 1267,1275 ----
    while (virtuals)
      {
        tree fndecl = TREE_OPERAND (FNADDR_FROM_VTABLE_ENTRY (TREE_VALUE (virtuals)), 0);
!       fprintf (stderr, "%s [%ld =? %ld]\n",
  	       IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (fndecl)),
! 	       (long) n, (long) TREE_INT_CST_LOW (DECL_VINDEX (fndecl)));
        ++n;
        virtuals = TREE_CHAIN (virtuals);
      }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]