This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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 3/7] Avoid -Wnarrowing warnings in struct tramp_frame instances


>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:

Pedro> On 08/09/2018 12:20 AM, Tom Tromey wrote:
>> --- a/gdb/common/common-types.h
>> +++ b/gdb/common/common-types.h
>> @@ -58,6 +58,9 @@ typedef unsigned long long ULONGEST;
>> /* * The largest CORE_ADDR value.  */
>> #define CORE_ADDR_MAX (~ (CORE_ADDR) 0)
>> 
>> +/* * The largest ULONGEST value.  */
>> +#define ULONGEST_MAX (~ (ULONGEST) 0)

Pedro> With '~' being a unary operator, the right format would be:

Pedro>   #define ULONGEST_MAX (~(ULONGEST) 0)

Pedro> But I see that CORE_ADDR_MAX has the same issue...

I'll just fix them both in the next revision.

Tom


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