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 gdb/22010] New: PASS->FAIL: gdb.base/sizeof.exp: check valueof "'\377'"


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

            Bug ID: 22010
           Summary: PASS->FAIL: gdb.base/sizeof.exp: check valueof
                    "'\377'"
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: thopre01 at gcc dot gnu.org
  Target Milestone: ---

Hi,

Following commit d6382fffde99214ce4aee99a208ddb703c647008 the following test
regressed on arm-none-eabi targets:

PASS->FAIL: gdb.base/sizeof.exp: check valueof "'\377'"

Having investigated a bit, I found the following behavior to be surprising:

(gdb) print (unsigned char) '\377'                                              
$5 = 255 '\377'
(gdb) print /d ((unsigned char) '\377')                                         
$7 = -1

I would expect printing 255 as a decimal integer to give 255 but here it gives
-1. It seems to be ignoring the cast.

-- 
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]