This is the mail archive of the gdb-prs@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]

[Bug compile/22188] New: gdb/arm-tdep.c:6449: (rn & 0xe) == 0x1 - tautology


https://sourceware.org/bugzilla/show_bug.cgi?id=22188

            Bug ID: 22188
           Summary: gdb/arm-tdep.c:6449: (rn & 0xe) == 0x1  - tautology
           Product: gdb
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: compile
          Assignee: unassigned at sourceware dot org
          Reporter: dilyan.palauzov at aegee dot org
  Target Milestone: ---

Compiling with GCC 8 I get:

binutils-gdb/gdb/arm-tdep.c: In function ‘int
arm_decode_misc_memhint_neon(gdbarch*, uint32_t, regcache*,
displaced_step_closure*)’:
binutils-gdb/gdb/arm-tdep.c:6449:52: error: bitwise comparison always evaluates
to false [-Werror=tautological-compare]
   else if (op1 == 0x10 && op2 == 0x0 && (rn & 0xe) == 0x1)
                                         ~~~~~~~~~~~^~~~~~

Indeed (whatever & 0xe) cannot have zero as least significant bit.

Likewise

binutils-gdb/gdb/rs6000-tdep.c: In function ‘CORE_ADDR skip_prologue(gdbarch*,
CORE_ADDR, CORE_ADDR, rs6000_framedata*)’:
binutils-gdb/gdb/rs6000-tdep.c:1859:34: error: bitwise comparison always
evaluates to false [-Werror=tautological-compare]
       else if ((op & 0xfc1f016a) == 0x7c01016e)
                ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~

op & 0x....a cannot be 0x....e

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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