This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] ptype: show members of an unnamed struct inside an union
On Tue, Aug 28, 2007 at 01:34:20PM -0700, Joel Brobecker wrote:
> > > Yes, I had to add a name to this field. Otherwise, there is no way
> > > to name it!
> > >
> > What about the case of an unnamed union, such as in my example? GDB
> > won't support displaying its members then?
>
> Does this case actually make any sense? I don't think you can access
> this union in your C program either, or can you?
GCC supports anonymous unions. There's a test for it in the GDB
testsuite, too.
I don't remember whether this was imported from C++ or from C99.
--
Daniel Jacobowitz
CodeSourcery