This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Feature-request: Possibility of transparent unions in structs
- To: Byron Stanoszek <gandalf at winds dot org>
- Subject: Re: Feature-request: Possibility of transparent unions in structs
- From: Mumit Khan <khan at NanoTech dot Wisc dot EDU>
- Date: Sat, 25 Mar 2000 11:11:59 -0600 (CST)
- cc: gcc at gcc dot gnu dot org
On Fri, 24 Mar 2000, Byron Stanoszek wrote:
> I have a large piece of code that uses the members of certain structures
> conditionally depending on other members of the structure. Furthermore, since
> only some of the members of the struct are used at some times, I feel I could
> save memory by making those members into a union. The problem is, I don't want
> to change those struct members in 60,000 lines of code.
[ ... ]
> Can anyone tell me if this feature exists currently in GCC (as a C extension),
> or if possible, can be added to gcc 2.96 / 3.0?
Yes. Support for anonymous aggregates (structs and unions) in C was added
back in October, 1999 and will show up in the next major release.
Regards,
Mumit