This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 3/7] Avoid -Wnarrowing warnings in struct tramp_frame instances
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)
With '~' being a unary operator, the right format would be:
#define ULONGEST_MAX (~(ULONGEST) 0)
But I see that CORE_ADDR_MAX has the same issue...
LGTM.
Thanks,
Pedro Alves