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: usecases of void foo(char **b) {} Date: Tue, 15 Nov 2016 15:01:52 -0800 Organization: None to speak of Lines: 34 Message-ID: References: <4c243d9f-8b30-4c8f-aeb7-f98b67df53df@googlegroups.com> <2609ed15-7c52-4d08-bf8c-2b9ef44fa809@googlegroups.com> <89e9cc99-3b51-44f1-91bc-f74b6f2b7f5a@googlegroups.com> <34d35fa8-fe94-4665-b0e1-21de4f507fe4@googlegroups.com> <52475847-d45a-4c24-9661-1ebe869759b3@googlegroups.com> <6c6a30d0-94cd-42a6-884a-2ac99995e681@googlegroups.com> <62d12ca1-490e-447d-b867-69b1458517be@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="4ec4d910e7b984fdf1507bf694506dd1"; logging-data="9452"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/i6DiSKc0cmtyYqkZqxj2o" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:94C8rBg2bg2PlpGLDpYZjCEdups= sha1:/2dn5Fxd5KJoS+z3StnNAXcGu4w= Xref: csiph.com comp.lang.c:96663 supercat@casperkitty.com writes: [...] > What I do not see is any indication that Dennis Ritchie expected that > implementations running on silent-wraparound hardware would treat overflow > in silent-wraparound function most of the time while occasionally treating > overflow as a license to misbehave in completely arbitrary fashion. What I do not see is any indication that you have any special insight into Dennis Ritchie's thoughts at the time. If he had expected what you say he didn't expect, how would he have expressed that? He wrote a printf function that was clearly system- and compiler-specific in some ways. I don't know the exact history, but it's entirely possible that the only C compiler in existence at the time was the one that he wrote. Someone porting the code to a non-two's-complement system, or to a system with int wider than 16 bits, would have to modify it. Likewise, someone porting the code to a system where signed integer overflow behaves in some way other than two's-complement wraparound would also have to modify it. You're making a lot of inferences from that. Apparently you find what you presume to be his expectations in 1974 to be more relevant than what he actually wrote in 1988 (which you conveniently snipped). -- 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"