This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


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

Re: [patch] limit and document unnamed fields.


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


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