This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Unnamed Structure declaration
- From: Jim Wilson <wilson at specifixinc dot com>
- To: Rob dot McConnell at Zarlink dot Com
- Cc: gcc-bugs at gcc dot gnu dot org
- Date: 02 Mar 2004 11:56:51 -0800
- Subject: Re: Unnamed Structure declaration
- References: <OF06F480F8.E36A43A4-ON80256E4B.003C675D@Zarlink.Com>
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