This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Initialising an union.


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





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]