Feature-request: Possibility of transparent unions in structs
Mumit Khan
khan@NanoTech.Wisc.EDU
Sat Mar 25 09:12:00 GMT 2000
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
More information about the Gcc
mailing list