www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/25/07:31:46

Message-ID: <331374BE.7392@post.comstar.ru>
Date: Tue, 25 Feb 1997 15:24:46 -0800
From: Dim Zegebart <zager AT post DOT comstar DOT ru>
Reply-To: zager AT post DOT comstar DOT ru
Organization: zager AT post DOT comstar DOT ru
MIME-Version: 1.0
To: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
CC: DJGPP Mail List <djgpp AT delorie DOT com>
Subject: Re: Zero length array ?
References: <Pine DOT LNX DOT 3 DOT 91 DOT 970225125935 DOT 5194A-100000 AT acp3bf>

Hans-Bernhard Broeker wrote:
> For the given example, why not keep away from being compiler specific by
> just specifying an array length of one, instead of zero. Perfectly
> portable, and without any problems. You'ld need at least a '\0' in the
> string anyway to be able to use C's string routines without testing for
> 'size<>0' each time.
IMHO, each extension was created to help programmers do their work best
and
fast. This is true in my case ( I agree with you what I may avoid
non-ansi
features, but it make my programm a little bit complex. Complex here,
complex
where ... after 10000 lines your just hang up or make another
ms-windowsXX )

> > > 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. ;)
> 
> Maybe, but this certainly would be different with the '-ansi' flag.
Yes, since we talk abou gcc extension.

-- 
Regards,
Dim Zegebart,
Moscow Russia.

PS. For all. Just out of curiosity : compile any of your programm whith
-ansi flag 
and look after that at the endless list of warnings and errors :)

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019