This is the mail archive of the gcc-help@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: Problem with anonymous structs and unions


Hi,

>How about naming the structs?

I believe naming the structs isn't the problem. The structs need to be "instantiated" (so to speak) by being given a variable name. Otherwise they are just declarative, not definitive.

However, I would argue that the practice of using unions to form synonyms is, itself, suspect. It looks like, to me, that at one point there was a (religous?) naming convention war, and unions were used as a compromise. Do away with the synonyms. (C/C++ unions themselves are often suspect, in my opinion.)

--Eljay


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