This is the mail archive of the gcc-bugs@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]
Other format: [Raw text]

Re: Unnamed Structure declaration


On Tue, 2004-03-02 at 03:30, Rob.McConnell@Zarlink.Com wrote:
> >From a curiosity point of view, what issues cropped up?

It was accidentally used in some places where it wasn't wanted.  For
instance, the linux kernel.

Also, some people pointed out that it adds nothing to the language. 
Allowing anonymous unions inside structures provides a useful feature,
and that one is still enabled by default.  This feature is also a
standard part of C++.  However anonymous structures inside structures
doesn't solve any real problem, and it some people objected to it, so it
is now enabled by an option.

> Do you know when these bugs were fixed so that I can say to people "use GCC
> versions later than x.y" for my work?

Offhand, I don't know.

This is probably target dependent and testcase dependent.  There have
been a number of problems with empty structures over the years, and
these problems have been fixed at different times.  Some of the fixes
were to machine independent code, and some to machine dependent code.

Empty structures are not valid ISO C by the way.  They are a GNU C
extension.
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com


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