Message-ID: <3314F3D8.16B0@post.comstar.ru> Date: Wed, 26 Feb 1997 18:39:20 -0800 From: Dim Zegebart Reply-To: zager AT post DOT comstar DOT ru Organization: zager AT post DOT comstar DOT ru MIME-Version: 1.0 To: DJGPP Mail List Subject: Re: Zero length array ? References: <33133A4B DOT 1571 AT post DOT comstar DOT ru> <331317D2 DOT 2DD1AF00 AT alcyone DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Erik Max Francis wrote: > > Dim Zegebart wrote: > > > typedef struct > > { int hName; > > char szName[0]; > > } TFoo; > ... > > My question is : then I allocate space for MyFoo where actualy > > MyFoo->szName points ? > > What you are trying to do is create variable-language records, which is not > a good idea in C. > > You cannot created zero-length arrays. This makes no conceptual sense > whatsoever in C. Guys, did you evere read gcc info? Look closer at 'C Extensions' chapter. ;) So, my question was not about correctness of my code but about some insidy things of that extension. -- Regards, Dim Zegebart, Moscow Russia.