This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] limit and document unnamed fields.
- To: DJ Delorie <dj at redhat dot com>
- Subject: Re: [patch] limit and document unnamed fields.
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- Date: Thu, 4 Oct 2001 02:41:34 +0100 (BST)
- cc: <gcc-patches at gcc dot gnu dot org>
On Wed, 3 Oct 2001, DJ Delorie wrote:
> > What about cases such as
> >
> > struct s { int x; struct { int x; }; };
> >
> > ? I think this should count as a duplicate member x, and be disallowed.
>
> I was not addressing that kind of problem with this patch. I was
> addressing the ability to do "int;" with this patch.
You were also addressing the lack of documentation and testcases for this
feature - which means that considering the precise definition of the
feature is appropriate at this point. (Documentation should be clear
about exactly what is allowed, but if we might want to disallow examples
such as the above (or more complicated cases, e.g. struct s { struct { int
a; struct { int b; }; }; struct { int b; }; };) we shouldn't document them
as allowed now and disallow them later.)
--
Joseph S. Myers
jsm28@cam.ac.uk