From: David Mosberger-Tang <davidm@AZStarNet.com>
Subject: Re: gcc question
Date: Tue, 4 Jun 1996 07:50:40 -0700 [thread overview]
Message-ID: <199606041450.HAA13535@koala.azstarnet.com> (raw)
>>>>> On Tue, 04 Jun 1996 08:22:26 -0400, "Michael K. Johnson" <johnsonm@nigel.vnet.net> said:
Michael> Linus Torvalds writes:
>> On Mon, 3 Jun 1996, David Mosberger-Tang wrote:
>>> Please note that it is _not possible_ to initialize unions in
>>> ANSI C.
>> Actually, it's possible (umm - raincheck on the standard here,
>> I'm too lazy to look it up, but I'm fairly certain). The standard
>> allows you to initialize unions, but only the _first_ entry in a
>> union.
Michael> Absolutely right. Cancel the raincheck, Linus.
Michael> Just in case anyone wants standards support, see 6.5.7. It
Michael> says "A brace-enclosed initializer for a union object
Michael> initializes the member that appears first in the
Michael> declaration list of the union type."
Yes, you're both right. I have an old C book which claims otherwise,
but checking a more recent one does indeed say that a union
initializer initializes the first member. Sorry about the confusion.
--david
next reply other threads:[~1996-06-04 14:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-06-04 14:50 David Mosberger-Tang [this message]
[not found] <Pine.LNX.3.91.960604103638.1696H-100000@linux.cs.Helsinki.FI>
1996-06-04 12:22 ` gcc question Michael K. Johnson
[not found] <199606032221.PAA15714@koala.azstarnet.com>
1996-06-04 7:46 ` Linus Torvalds
-- strict thread matches above, loose matches on Subject: below --
1996-06-03 22:21 David Mosberger-Tang
1996-06-03 21:13 Brian Wood
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox