Mail Archives: djgpp/1997/02/25/06:45:19
Hans-Bernhard Broeker wrote:
>
> In article <33133A4B DOT 1571 AT post DOT comstar DOT ru> you wrote:
>
> > typedef struct
> > { int hName;
> > char szName[0];
> > } TFoo;
>
> > My question is : then I allocate space for MyFoo where actualy
> > MyFoo->szName points ?
> gcc does allow zero-length arrays,
Yes you are right, this feature is documented in gcc.info (see C
Extensions)
> but that makes your code unportable to other
> compilers, which is not a very good idea.
The only CPU I know is Z80 (where GCC don't ported ;) (8086 and 80286
too)
So, why you are thinking about some hypothetical compilers then you
have
gcc at most palforms ???
> Just out of curiosity: did you ever try to compile the code you
posted
> with 'gcc -O -Wall', and look at the errors and warnings you get?
Certainly yes! No warnings noe errors. ;)
--
Regards,
Dim Zegebart,
Moscow Russia.
- Raw text -