Re: [RFA v2] Allow cygwin native to compile with --enable-64-bit-bfd

Christopher Faylor
2007-12-02T02:43:17Z

On Thu, Nov 29, 2007 at 11:11:11AM +0100, Pierre Muller wrote:
>> >> And the warning is?
>> >
>> >Cast from pointer to integer of different size. Casts are the way
>> >we've handled it elsewhere in GDB, but I wouldn't complain about a
>> >wrapper; casting host pointers to CORE_ADDRs is an action we try to
>> >keep to a minimum anyway.
>>
>> I wouldn't mind a double cast either, if there is precedent for that.
>
> Here is a revised patch that only uses double typecasts.
> I ran the testsuite and got a slight improvement (2 FAIL less in
>gdb.base/signals.exp),
>but I doubt this is significant...
>
>OK to check in?

I'd like to get opinions from other maintainers on the use of a macro
for this case. I don't like seeing unexplained double casts like this
and I think a macro could make it clearer.

Daniel were you implying that you would just tolerate a macro here or
do you think it's an ok idea.

cgf

>ChangeLog entry:
>
>2007-11-28 Pierre Muller <muller@ics.u-strasbg.fr>
>
> *win32-nat.c: Allow compilation if CORE_ADDR is 8 byte long.
> Add "gdb_stdint.h" dependency required for uintptr_t type use.
> (handle_output_debug_string): Use uintptr_t typecast.
> (handle_exception): Ditto.
> (win32_xfer_memory): Ditto.