[Bug 211305] devel/gdb: (CORE_ADDR) 0 missing * in cast in tui/tui-stack.c
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Mon Aug 1 01:23:10 UTC 2016
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=211305
--- Comment #9 from Mark Millard <markmi at dsl-only.net> ---
(In reply to Mark Millard from comment #5)
For:
msp430-tdep.c:401:24: warning: comparison of constant 16 with expression of
type 'MSP430_Size' is always false
[-Wtautological-constant-out-of-range-compare]
int size = opc.size == 16 ? 2 : 4;
~~~~~~~~ ^ ~~
Things are odd:
/include/opcode/msp430-decode.h has:
typedef enum
{
MSP430_Byte = 0,
MSP430_Word,
MSP430_Addr
} MSP430_Size;
. . .
typedef struct
{
. . .
MSP430_Size size; /* Operand size in BITS. */
. . .
} MSP430_Opcode_Decoded;
While gdb/msp430-tdep.c has:
MSP430_Opcode_Decoded opc;
So if the code generation matches the warning:
int size = opc.size == 16 ? 2 : 4;
would turn into
int size = 4;
Adding a MSP430_Size name for the value 16 likely would avoid the warning or
any odd optimization even if the symbolic name is not otherwise used.
(I've just assumed that the 16 is appropriate.)
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-ports-bugs
mailing list