This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Problem with anonymous structs and unions
- From: Eljay Love-Jensen <eljay at adobe dot com>
- To: Oscar Fuentes <ofv at wanadoo dot es>, gcc-help at gcc dot gnu dot org
- Cc: mramirez at iua dot upf dot es
- Date: Wed, 13 Nov 2002 11:58:01 -0600
- Subject: Re: Problem with anonymous structs and unions
- References: <1647.193.145.55.171.1037180185.squirrel@iuamtg.upf.es>
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