Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: A glitch regarding the usual malloc() idiom Date: Tue, 26 Jul 2016 10:50:35 -0700 Organization: None to speak of Lines: 20 Message-ID: References: <7d995799-5f23-4784-a62e-ea423de00650@googlegroups.com> <36f1e05e-609e-4e0e-8819-86feee1f4d8c@googlegroups.com> <57933a73.4812875@news.xs4all.nl> <5793c8e5.2941812@news.xs4all.nl> <87oa5n97rz.fsf@bsb.me.uk> <87wpkar54r.fsf@bsb.me.uk> <87d1m1r99c.fsf@bsb.me.uk> <871t2hqn06.fsf@bsb.me.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="945944de09706c9b4e29b53c9d2efdc2"; logging-data="1125"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18RCS3VTXqLrajDKI3LcDU+" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:W8SCxsZjK13h7JnHohQhgwc02ts= sha1:Vg1diNY9HNtyYMYdTaENO46oi+Q= Xref: csiph.com comp.lang.c:91099 supercat@casperkitty.com writes: > On Tuesday, July 26, 2016 at 11:29:20 AM UTC-5, Jerry Stuckle wrote: >> Yes, the standards committee assumes a modicum of intelligence by those >> who read the standards. I see you can't even reach that level. > > Why is the same attitude not expressed when compilers take something like: > > unsigned mul(unsigned short x, unsighed short y) { return x*y; } > > and produce code that doesn't work when the product is in the range > INT_MAX+1u and UINT_MAX? Where have I heard that before? Oh, that's right, in every thread you post in. Do you have a new point that you haven't made before? -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"