This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Initialising an union.
- To: Jeroen Dobbelaere <Jeroen dot Dobbelaere at tvd dot be>, egcs-bugs <egcs-bugs at cygnus dot com>
- Subject: Re: Initialising an union.
- From: Aurel Balmosan <ab at orga dot com>
- Date: Wed, 19 Aug 1998 13:38:32 +0200
- Organization: ORGA Kartensysteme GmbH
- References: <35D842BF.93D35CB8@orga.com> <35D9C176.873FB5F6@tvd.be>
Jeroen Dobbelaere wrote:
> 5 To zero-initialize storage for an object of type T means:
> [..]
>
> --if T is a union type, the storage for its first data member5) is
> zero-initialized;
>
> [.....]
>
> 15When a union is initialized with a brace-enclosed initializer, the
> braces shall only contain an initializer for the first member of the
> union. [Example:
Well in the ANSI-C books I have this is not defined in this way. It is only
said that unions can now be initialised (ANSI-C version 2)
So it seems to not a bug in egcs-1.0.3a but what draft is it? C++ or ANSI-C?
Bye,
Aurel.
--
Aurel Balmosan | Department SE-SW
ORGA Kartensysteme GmbH | phone: +49 5254 991 824
An der Kapelle 2 | fax : +49 5254 991 749
33104 Paderborn, Germany | mailto:ab@orga.com