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 exp/19312] New: incorrect evaluation of expression with convenience variable


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

            Bug ID: 19312
           Summary: incorrect evaluation of expression with convenience
                    variable
           Product: gdb
           Version: unknown
            Status: NEW
          Severity: normal
          Priority: P2
         Component: exp
          Assignee: unassigned at sourceware dot org
          Reporter: tromey at sourceware dot org
  Target Milestone: ---

Consider this transcript:

(gdb) p $x = (void * ) 57
$3 = (void *) 0x39
(gdb) p $x
$4 = (void *) 0x39
(gdb) p $x + 7
$5 = (void *) 0x40
(gdb) p $x + 7 = 3
$6 = (void *) 0x3
(gdb) p $x
$7 = (void *) 0x3


Here, gdb somehow ignores the "+7" in the assignment and
sets $x to 3.

I would have expected a syntax error here instead.

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