Path: csiph.com!weretis.net!feeder6.news.weretis.net!feeder7.news.weretis.net!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: OT: improve this simple algorithm? Date: Thu, 14 Nov 2019 10:15:28 -0800 Organization: None to speak of Lines: 21 Message-ID: References: <7C%yF.190832$mB7.170245@fx32.am4> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader02.eternal-september.org; posting-host="91c2f33abe4e47ebddbfec820ab61ca8"; logging-data="32106"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+w4/voy0RiiaqHG9HAn/FA" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:caAGu4DZu4OswBdaBNCIuDipp2A= sha1:hpiibbdvUdOXhOigfBFDEGcb/Rw= Xref: csiph.com comp.lang.c:147991 David Brown writes: [...] > gcc -Wvla > > warns if a VLA is used. > > And > gcc -Wvla-larger-than=10000 > > warns if a VLA is bigger than 10000 bytes (or might be bigger than > that). It is useful to have optimisation enabled to let the compiler > work out bounds more accurately. Note that the latter option might not warn about some VLAs if gcc has optimized them into ordinary arrays. (The gcc documentation covers this.) -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for Philips Healthcare void Void(void) { Void(); } /* The recursive call of the void */