This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug gdb/14800] New: designated initializers don't work
- From: "palves at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Fri, 02 Nov 2012 17:23:46 +0000
- Subject: [Bug gdb/14800] New: designated initializers don't work
- Auto-submitted: auto-generated
http://sourceware.org/bugzilla/show_bug.cgi?id=14800
Bug #: 14800
Summary: designated initializers don't work
Product: gdb
Version: HEAD
Status: NEW
Severity: normal
Priority: P2
Component: gdb
AssignedTo: unassigned@sourceware.org
ReportedBy: palves@redhat.com
Classification: Unclassified
Designated initializers don't work in GDB.
http://gcc.gnu.org/onlinedocs/gcc/Designated-Inits.html
struct S
{
int field;
};
struct S s;
int
main ()
{
return 0;
}
(gdb) p s
$1 = {field = 0}
(gdb) p s = { 1 }
$2 = {field = 1}
(gdb) p s = { .field = 2 }
A syntax error in expression, near `.field = 2 }'.
(gdb)
Someone implementing this might want to take a look at the since removed
OP_LABELED code, which had comments about being useful at supporting this
feature, at <http://sourceware.org/ml/gdb-patches/2012-11/msg00049.html>.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.