[PATCH] Fix windows-nat.c for -Wnarrowing

Eli Zaretskii eliz@gnu.org
Wed Aug 29 19:29:00 GMT 2018


> From: Tom Tromey <tom@tromey.com>
> Cc: Tom Tromey <tom@tromey.com>,  palves@redhat.com,  gdb-patches@sourceware.org
> Date: Wed, 29 Aug 2018 13:22:27 -0600
> 
> >>>>> "Eli" == Eli Zaretskii <eliz@gnu.org> writes:
> 
> Eli> Why did you need to make .them be DWORD?  I think it should be a
> Eli> 'long', and then you can use -1L without any trouble.
> 
> Thanks for the suggestion.  I tried this just now but long doesn't work
> without additional casts:
> 
> ../../binutils-gdb/gdb/windows-nat.c:304:1: error: narrowing conversion of '3221225477' from 'DWORD {aka long unsigned int}' to 'long int' inside { } [-Wnarrowing]
>  };
>  ^

I don't understand: EXCEPTION_ACCESS_VIOLATION is defined like this:

  #define STATUS_ACCESS_VIOLATION 		      0xC0000005
  #define EXCEPTION_ACCESS_VIOLATION		      STATUS_ACCESS_VIOLATION

And you've removed DWORD from the definition of xlate.  So where does
DWORD come from?



More information about the Gdb-patches mailing list