Path: csiph.com!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: How to avoid an overflow during multiplication? Date: Thu, 03 Feb 2022 13:33:56 -0800 Organization: None to speak of Lines: 18 Message-ID: <877dabljnf.fsf@nosuchdomain.example.com> References: <8735m954yz.fsf@bsb.me.uk> <877dbk36qu.fsf@nosuchdomain.example.com> <86v8ydp57h.fsf@linuxsc.com> <86pmojo7th.fsf@linuxsc.com> <86sfszlsfd.fsf@linuxsc.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: reader02.eternal-september.org; posting-host="833c2fa4bd384948b97d604ba3ea646b"; logging-data="6447"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+JT2v/3IlpcGiCkfSK72my" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) Cancel-Lock: sha1:AoYKAGXCBUFONgj7E9gquyttfLM= sha1:m4BumiKsRZhcZ5y1DcZsOe3KZQQ= Xref: csiph.com comp.lang.c:164760 Mateusz Viste writes: [...] > It's not like I reject C99 completely - I do use it in a few projects, > mainly for bad reasons (to name two: extensive use of VLAs, looked nice > and fun when I started using it, and by the time I realized that's a > trap it was too late - the cost of redoing things the proper way is too > high now so I'm living with it now ; second is 3rd-party code that > insists on using [0]-sized arrays and mixes variable declaration with > code). C99 doesn't support zero-sized arrays. Attempting to define a zero-sized ordinary array is a constraint violation. Creating a zero-sized VLA has undefined behavior. -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com Working, but not speaking, for Philips void Void(void) { Void(); } /* The recursive call of the void */