Date: Sun, 10 Aug 1997 14:32:17 -0400 From: Joel Ray Holveck <joelh@gnu.ai.mit.edu> To: wpaul@skynet.ctr.columbia.edu Cc: chat@FreeBSD.ORG Subject: Re: variable sized arrays and gcc Message-ID: <199708101832.OAA09511@ethanol.gnu.ai.mit.edu> In-Reply-To: <199708100722.DAA03236@skynet.ctr.columbia.edu> (message from Bill Paul on Sun, 10 Aug 1997 03:22:28 -0400 (EDT))
next in thread | previous in thread | raw e-mail | index | archive | help
> Okay, maybe I haven't been paying attention, but this is the first > time I've ever noticed that gcc would let you do this. Personally, > I think it's damn strange, especially since _no_ other C compiler I > can find behaves the same way. gcc has been doing variable sized arrays for some time. RTFM; it has a section on this and many other non-ANSI GCC features which can make life *much* easier (including things such as a no-side-effect, any-type-argument version of MIN and MAX, printf-style argument checking, etc, etc). > If it's a feature, I don't think it's a particularly good one since > it encourages the use of non-ANSI (and apparently non-portable) > code. Well, in most situations it can be handled portably nearly as easily. But not always. The real question is, what are your priorities? If you are writing an internal program, that is never going to leave your company's walls, use every compiler trick and OS trick you know. If you are writing for FreeBSD, I see no problem using extentions common to both gcc and pcc. (inline, for instance.) But if you are writing a new version of empire, then it's time to use malloc. Happy hacking, joelh -- Second law of programming: Anything that can go wrong wi sendmail: segmentation violation -- core dumped
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199708101832.OAA09511>