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 exp/11530] New: sizeof of anonymous union member does not work


struct a
  {
    union
      {
        int i;
      };
  } a;
int
main (void)
{
  return sizeof (a.i);
}
-------------------------------------------------------------------------------
C code returns 4.
GDB:
(gdb) p sizeof (a.i)
Type struct a has no component named i.
Although:
(gdb) p a.i
$1 = 0

-- 
           Summary: sizeof of anonymous union member does not work
           Product: gdb
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: exp
        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=11530

------- 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]