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/14800] New: designated initializers don't work


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.


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