home | list info | list archive | date index | thread index

what is the purpose of a union with only a single member?

reading someone else's code, and ran across a declaration of the form:

  union thingy *thingy;

(yes, the same name is used both for the union type and instance,
but that's not why we're here.)

  what is the purpose of defining a union with only a single
member? is this some tricky feature of C that i'm unaware of?
i would *think* that this is equivalent to just writing:

  struct thingy *thingy;

but i'd really like to be sure. thoughts?

rday


To unsubscribe send a blank message to linux+unsubscribe [ at ] linux-ottawa [ dot ] org
To get help send a blank message to linux+help [ at ] linux-ottawa [ dot ] org
To visit the archives: https://lists.linux-ottawa.org