Path: csiph.com!news.swapon.de!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: "The long goodbye to C" by Eric Raymond Date: Wed, 15 Nov 2017 12:29:06 -0800 Organization: None to speak of Lines: 35 Message-ID: References: <657c97f3-c8b8-46b6-a8e8-4023ebe0e099@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader02.eternal-september.org; posting-host="8cb74c8c010586bd290695b6b8300a1f"; logging-data="822"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19VD+elnr8l+YW3O/BvgNki" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:jp6Rr8dgzdJhlfuDQNEDHRRZIbU= sha1:VHR9L5t9pIAJdzAQ44GUv2OMTlQ= Xref: csiph.com comp.lang.c:122625 supercat@casperkitty.com writes: > On Wednesday, November 15, 2017 at 1:13:27 PM UTC-6, Keith Thompson wrote: >> Are you suggesting that the C standard should require implementations to >> "behave in a manner that would be non-astonishing to someone familiar >> with the underlying platform"? > > The easiest way to make an implementation that targets a typical platform > suitable for low-level programming use thereon is to make it behave in ways > characteristic of the environment when the Standard allows, without regard > for whether the Standard mandates such behavior. > > The Standard makes no effort to mandate that conforming implementations be > suitable for low-level programming, in part because implementations that are > not suitable for that purpose may be useful for other purposes. The fact > that the Standard does not mandate some particular behavior does not imply > any judgment by the authors of the Standard as to whether a lack of support > for such features would make an implementation unsuitable for some purposes. > > Nothing in the C Standard would distinguish a compiler that targets the > 68000 and would process "*(unsigned long volatile*)0x12345678 = 0xABCD1234" > by writing a value of 0xABCD4321 to physical address 0x12345678, from one > which targets the same CPU but would map integers to addresses in some other > fashion. The failure of the Standard to recognize a category of compilers > that are suitable for low-level programming does not, however, imply that > someone who genuinely wants to make a compiler suitable for low-level > programming on that platform should have any difficulty recognizing how > such a compiler should behave. So would that be a "no"? -- 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"