From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aurel Balmosan To: Alexandre Oliva , egcs-bugs Subject: Re: Initialising an union Date: Thu, 20 Aug 1998 02:41:00 -0000 Message-id: <35DBD533.721DB13F@orga.com> References: <35D92F35.280D31A1@orga.com> <35DA8595.B69BDFC4@orga.com> X-SW-Source: 1998-08/msg00404.html List-Id: Alexandre Oliva wrote: > Does it apply to local non-static variables? I'm pretty sure this is > true for variables in static storage, but how about local ones? > Unfortunately, I don't have access to the ANSI-C Standard :-( It does. In the ANSI-C Language Referenze Version 2 A.8.7 from 31.Oct.1988 ANSI Programming Langues C, X.3.159-1989 you find the sentence: In the first edition the initialisation of auto and register struct's, union's or vektors was not allowed. The ANSI-C standard allowes to use const constructors or simple initilizer expresions. This make clear that auto and register structs/unions/vektors can be initialised. Also I used the same code on different platforms i.e DEC-Unix where we use the standard C compiler which comes with the OS. There the code works as I expected. So now I am back that the egcs-1.0.3a has a bug here. 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