This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug symtab/11846] New: struct should not permit ->
- From: "jan dot kratochvil at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: 28 Jul 2010 11:03:51 -0000
- Subject: [Bug symtab/11846] New: struct should not permit ->
- Reply-to: sourceware-bugzilla at sourceware dot org
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.