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 symtab/11846] New: struct should not permit ->


struct
  {
    int x;
  }
s = { 42 };
int main (void) { return s.x; }

OK:
(gdb) p s.x
$2 = 42
But this is wrong:
(gdb) p s->x
$3 = 42
GCC prints:
.c:6: error: invalid type argument of â??->â?? (have â??struct <anonymous>â??)

GNU gdb (GDB) 7.2.50.20100728-cvs

-- 
           Summary: struct should not permit ->
           Product: gdb
           Version: unknown
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P2
         Component: symtab
        AssignedTo: unassigned at sourceware dot org
        ReportedBy: jan dot kratochvil at redhat dot com
                CC: gdb-prs at sourceware dot org
GCC target triplet: x86_64-unknown-linux-gnu


http://sourceware.org/bugzilla/show_bug.cgi?id=11846

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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