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]
Other format: [Raw text]

Re: [patch c++]: 1 of 7 Fix for PR target/53912 bootstrap fails using default c++ mode in stage 2 and 3 for native x86_64-w64-mingw32


2012/11/29 Pedro Alves <palves@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


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