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: Portable 16 bit binary integer write Date: Thu, 15 Sep 2016 11:21:35 -0700 Organization: None to speak of Lines: 31 Message-ID: References: <50a1e8f4-4fb3-4491-97d0-54768bf28685@googlegroups.com> <4fde1133-61ff-4045-9cbe-cccff1408ad3@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="945944de09706c9b4e29b53c9d2efdc2"; logging-data="28689"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19DCPyMTF7HvAI3ZNDC5Ogx" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:Gm2oGt42vZN7CN1U+4sAtiT56vg= sha1:LdGmmTyhePqExaxcHVyP6lV0LgE= Xref: csiph.com comp.lang.c:93547 supercat@casperkitty.com writes: > On Thursday, September 15, 2016 at 4:28:00 AM UTC-5, David Brown wrote: >> If the answers are no, then it is a waste of time (except for fun or >> education) even thinking about the issue. It is certainly a waste of >> time and effort to write code intentionally in a way that is agnostic to >> the integer encoding. And if keeping it so portable means poorer >> generated code on real-world systems, then you have definitely lost out. > > What do you think the authors of the C89 Standard intended should happen > in cases where certain actions yielded a consistent predictable behavior > on an *easily-recognizable* 95%+ of platforms, but where a few easily- > recognizable targets would not support such reliable behavior, or where > code for a few easily-recognizable implementations might rely upon the > fact that such actions do something else? > > It seems fashionable today to regard the failure of the Standard to > mandate that a behavioral guarantee be honored on ALL systems (even those > where it would be very costly and offer little benefit) as an indication > that programmers should be required to do without the guarantee even on > platforms where it would be useful and cheap. Do you agree with my > assessment of the fashionable viewpoint, and do you think that viewpoint > is reasonable? You should start a blog so you can make these points without re-writing them every time. -- 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"