[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gnugo-devel] unions in gcc 2.95

From: Paul Pogonyshev
Subject: Re: [gnugo-devel] unions in gcc 2.95
Date: Wed, 5 May 2004 14:22:20 +0300
User-agent: KMail/1.6.51

To summarize there are two problems with the union:

  - standard C doesn't allow initializing arbitrary union member;

  - anonymous unions are not standard either.

And one benefit: it saves some memory.

I can see three options:

   - discard the union completely and switch to using the structure which
  is currently used as non-GCC fallback now (simple, but wastes a bit of

  - make the union also depend on GCC version (somewhat ugly, but
  transparent for higher-level code);

  - name the union to solve the second problem (ugly and _not_ transparent
  for other code).

I personally prefer the second or the first.  I don't want to carry some
meaningless (or even meaningful, but not serving any real purpose) name
for the union around.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]