public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/14800] New: designated initializers don't work
@ 2012-11-02 17:23 palves at redhat dot com
  0 siblings, 0 replies; only message in thread
From: palves at redhat dot com @ 2012-11-02 17:23 UTC (permalink / raw)
  To: gdb-prs

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.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-11-02 17:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-02 17:23 [Bug gdb/14800] New: designated initializers don't work palves at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).