Path: csiph.com!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Tim Rentsch Newsgroups: comp.lang.c Subject: Re: How to avoid an overflow during multiplication? Date: Fri, 21 Jan 2022 05:51:30 -0800 Organization: A noiseless patient Spider Lines: 26 Message-ID: <86v8ydp57h.fsf@linuxsc.com> References: <8735m954yz.fsf@bsb.me.uk> <877dbk36qu.fsf@nosuchdomain.example.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader02.eternal-september.org; posting-host="9bbd2bd2338bc444f9d0c408d9cb7c1c"; logging-data="20633"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18qwMJ8lUvMlnXQjJB2WmrWaGVa9fnquuM=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:nsZ0mpc9rYD13G7WHfzWx9V+ZJg= sha1:V9T3DNQ7n4uFvztBDI01+/IFHSE= Xref: csiph.com comp.lang.c:164505 Mateusz Viste writes: > 2021-12-31 at 18:37 -0500, James Kuyper wrote: > >> Calling it ANSI C is not very useful, because that designation is >> ambiguous. > > I was only stating about "my copy of ANSI C". Didn't mean to specify > any more than that, really. > >> uint32_t and uint16_t, both of which are used in your code, were added >> to the language in C99. So apparently you don't consider C99 a >> complete atrocity. > > My answer was obviously slightly provocative. In truth, I am no puritan > and I do pick sometime things out of C89, like uint32_t, snprintf() and > the like. I also appreciate __uint128_t very much, even though it is not > part of any standard. For practical purposes I find the gnu89 dialect > to suit me pretty well. Can you say what you think the downside is of using C99? If there are parts of C99 you don't like you can always just not use them. Also, I'm curious to know what extensions, if any, from the gnu additions you make use of.