2012/11/29 Pedro Alves <pal...@redhat.com>:
> On 11/29/2012 12:03 PM, Kai Tietz wrote:
>> Hello,
>>
>> this trivial patch fixes a bootstrap issue on LLP64 hosts.
>
> But it's trivial at the expense of truncating the pointer.
> Looking around, I'd think that something like casting to hwi (after 
> uintptr_t),
> and then use HOST_WIDE_INT_PRINT_HEX as format would be the gcc way.
>
>> Index: cp/class.c
>> ===================================================================
>> --- cp/class.c  (Revision 193925)
>> +++ cp/class.c  (Arbeitskopie)
>> @@ -7817,7 +7817,7 @@ dump_class_hierarchy_r (FILE *stream,
>>    indented = maybe_indent_hierarchy (stream, indent, 0);
>>    fprintf (stream, "%s (0x%lx) ",
>>            type_as_string (BINFO_TYPE (binfo), TFF_PLAIN_IDENTIFIER),
>> -          (unsigned long) binfo);
>> +          (unsigned long) (uintptr_t) binfo);
>
> --
> Pedro Alves

Well, hwi format is of course the way to display pointer complete.  On
the other hand are in most cases lower 32-bit sufficent on
debug-output.

Kai

Reply via email to