This is the mail archive of the gcc@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: Feature-request: Possibility of transparent unions in structs


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



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