Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #64730

Re: More physical source files

From Keith Thompson <kst-u@mib.org>
Newsgroups comp.lang.c
Subject Re: More physical source files
Date 2015-07-05 18:16 -0700
Organization None to speak of
Message-ID <lnd206w0fc.fsf@kst-u.example.com> (permalink)
References (11 earlier) <ln4mll18ak.fsf@kst-u.example.com> <71c62ee8-0007-446b-9004-c6def341205a@googlegroups.com> <EKTlx.35368$ax2.14572@fx07.iad> <89818ea5-b4df-4519-9383-3a704e3670e5@googlegroups.com> <5bbf7a34-8d8f-4a2b-bf48-fe174341ff2d@googlegroups.com>

Show all headers | View raw


David Kleinecke <dkleinecke@gmail.com> writes:
> On Sunday, July 5, 2015 at 9:23:03 AM UTC-7, David Kleinecke wrote:
>> On Saturday, July 4, 2015 at 9:22:08 AM UTC-7, Richard Damon wrote:
>> > On 7/4/15 11:08 AM, David Kleinecke wrote:
>> > > On Friday, July 3, 2015 at 10:05:21 AM UTC-7, Keith Thompson wrote:
>> > 
>> > > Am I, perhaps confusing "implementatio-defined" with "unspecified"?
>> > > What exactly is the difference.
>> > >
>> > 
>> > Implementation-defined means that the implementation MUST document the 
>> > choice in its conformance document. Unspecified means it doesn't have to.
>> > 
>> > Because the implementation must document the behavior, a (non-strictly) 
>> > conforming program can have known behavior. With unspecified behavior, 
>> > it could be quite possible for the implementation to choice different 
>> > options under different (perhaps even subtly) conditions.
>> 
>> I didn't know that. I assumed the implementation would document its
>> specifications. Now the question becomes why are some features left
>> optionally undocuemnted?
>
> This has been very educational for me. My attitude towards the standards
> has changed. I think I have considerably less respect for them now. And I
> am sure I want to reject all the standards after C90. 

Why?  The definitions of unspecified, undefined, and
implementation-defined behavior have not changed between C90 and C99,
or between C99 and C11, and the kinds of things in those categories
have not changed substantially.

In most cases, undefined behavior is something that's logically
an error, but where it would be impractical to require all
implementations to detect it in all cases.  An example is
signed integer overflow; detecting it in all cases would impose
substantial overhead on all signed integer arithmetic (except
where the compiler can prove that an operation cannot overflow).
(Of course an implementation is free to insert code to check
for overflow; that's one of the infinitely many things that an
implementation can do for undefined behavior.)

Unspecified (but not implementation-defined) behavior is similar:
the authors of the standard did not feel it was worthwhile to
require each implementation to document the behavior.  An example
is the order of evaluation of arguments in a function call.  In my
opinion, neither specifying the order of evaluation of arguments, nor
requiring each implementation to document how the order of evaluation
is determined, would be worthwhile.  Of course an implementation
is free to document the order anyway; I know of none that do so.

> I would call what I want "Core C" except for ...
>
> Unfortunately K&R 1978 is not thorough enough to use as a standard (and
> it omits things). I want a lightweight version of C90. This is IMO what
> most C programmers code to (except maybe for // comments and statement-
> declaration mixing. 
>
> Actually my interest lies not in producing code but in documenting it.
> If I must assume a reader must know eveything in an unreadable 683
> page document I am defeted before I start.

If you want to define a modified version of C, I think you need to
understand C as it's currently defined.  Likewise if you want to
criticize it.  (I don't find the standard unreadable.)

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
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"

Back to comp.lang.c | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

More physical source files David Kleinecke <dkleinecke@gmail.com> - 2015-06-27 11:19 -0700
  Re: More physical source files Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-06-27 11:54 -0700
    Re: More physical source files Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-06-27 21:20 +0100
  Re: More physical source files Bartc <bc@freeuk.com> - 2015-06-27 20:24 +0100
    Re: More physical source files David Kleinecke <dkleinecke@gmail.com> - 2015-06-29 07:14 -0700
      Re: More physical source files Keith Thompson <kst-u@mib.org> - 2015-06-29 08:16 -0700
        Re: More physical source files David Kleinecke <dkleinecke@gmail.com> - 2015-06-30 08:24 -0700
          Re: More physical source files Robert Wessel <robertwessel2@yahoo.com> - 2015-06-30 12:15 -0500
          Re: More physical source files Keith Thompson <kst-u@mib.org> - 2015-06-30 15:14 -0700
            Re: More physical source files David Kleinecke <dkleinecke@gmail.com> - 2015-07-01 08:38 -0700
              Re: More physical source files glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-07-01 16:43 +0000
                Re: More physical source files Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-07-01 18:52 +0100
                Re: More physical source files Keith Thompson <kst-u@mib.org> - 2015-07-01 11:21 -0700
                Re: More physical source files glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-07-01 18:36 +0000
                Re: More physical source files Richard Damon <Richard@Damon-Family.org> - 2015-07-01 22:33 -0400
                Re: More physical source files glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-07-02 19:11 +0000
              Re: More physical source files Keith Thompson <kst-u@mib.org> - 2015-07-01 11:08 -0700
                Re: More physical source files Richard Damon <Richard@Damon-Family.org> - 2015-07-01 22:30 -0400
                Re: More physical source files David Kleinecke <dkleinecke@gmail.com> - 2015-07-02 08:29 -0700
                Re: More physical source files Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-07-02 17:56 +0100
                Re: More physical source files James Kuyper <jameskuyper@verizon.net> - 2015-07-02 13:21 -0400
                Re: More physical source files David Kleinecke <dkleinecke@gmail.com> - 2015-07-03 08:54 -0700
                Re: More physical source files James Kuyper <jameskuyper@verizon.net> - 2015-07-04 12:23 -0400
                Re: More physical source files Martin Shobe <martin.shobe@yahoo.com> - 2015-07-04 11:36 -0500
                Re: More physical source files Keith Thompson <kst-u@mib.org> - 2015-07-02 16:42 -0700
                Re: More physical source files David Kleinecke <dkleinecke@gmail.com> - 2015-07-03 08:54 -0700
                Re: More physical source files Keith Thompson <kst-u@mib.org> - 2015-07-03 10:05 -0700
                Re: More physical source files glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-07-03 21:57 +0000
                Re: More physical source files James Kuyper <jameskuyper@verizon.net> - 2015-07-04 00:30 -0400
                Re: More physical source files David Kleinecke <dkleinecke@gmail.com> - 2015-07-04 08:08 -0700
                Re: More physical source files Richard Damon <Richard@Damon-Family.org> - 2015-07-04 12:21 -0400
                Re: More physical source files David Kleinecke <dkleinecke@gmail.com> - 2015-07-05 09:22 -0700
                Re: More physical source files David Kleinecke <dkleinecke@gmail.com> - 2015-07-05 09:49 -0700
                Re: More physical source files Keith Thompson <kst-u@mib.org> - 2015-07-05 18:16 -0700
                Re: More physical source files David Kleinecke <dkleinecke@gmail.com> - 2015-07-06 08:37 -0700
                Re: More physical source files James Kuyper <jameskuyper@verizon.net> - 2015-07-06 12:56 -0400
                Re: More physical source files Keith Thompson <kst-u@mib.org> - 2015-07-06 11:59 -0700
                Re: More physical source files James Kuyper <jameskuyper@verizon.net> - 2015-07-06 15:45 -0400
                Re: More physical source files Keith Thompson <kst-u@mib.org> - 2015-07-06 13:14 -0700
                Re: More physical source files Philip Lantz <prl@canterey.us> - 2015-07-07 01:10 -0700
                Re: More physical source files David Kleinecke <dkleinecke@gmail.com> - 2015-07-07 08:00 -0700
                Re: More physical source files David Kleinecke <dkleinecke@gmail.com> - 2015-07-07 07:55 -0700
                Re: More physical source files James Kuyper <jameskuyper@verizon.net> - 2015-07-07 13:13 -0400
                Re: More physical source files David Kleinecke <dkleinecke@gmail.com> - 2015-07-08 08:35 -0700
                Re: More physical source files James Kuyper <jameskuyper@verizon.net> - 2015-07-08 12:31 -0400
                Re: More physical source files David Kleinecke <dkleinecke@gmail.com> - 2015-07-09 08:50 -0700
                Re: More physical source files Richard Heathfield <rjh@cpax.org.uk> - 2015-07-09 16:56 +0100
                Re: More physical source files Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-07-09 13:31 -0700
                Re: More physical source files Keith Thompson <kst-u@mib.org> - 2015-07-09 15:03 -0700
                Re: More physical source files Ian Collins <ian-news@hotmail.com> - 2015-07-10 10:54 +1200
                Re: More physical source files David Kleinecke <dkleinecke@gmail.com> - 2015-07-10 09:52 -0700
                Re: More physical source files James Kuyper <jameskuyper@verizon.net> - 2015-07-09 14:32 -0400
                Re: More physical source files James Kuyper <jameskuyper@verizon.net> - 2015-07-05 13:41 -0400
                Re: More physical source files Richard Damon <Richard@Damon-Family.org> - 2015-07-05 14:17 -0400
                Re: More physical source files Keith Thompson <kst-u@mib.org> - 2015-07-04 12:36 -0700
                Re: More physical source files Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-07-04 15:19 -0700
                Re: More physical source files Keith Thompson <kst-u@mib.org> - 2015-07-04 15:42 -0700
                Re: More physical source files James Kuyper <jameskuyper@verizon.net> - 2015-07-04 19:04 -0400
                Re: More physical source files Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-07-05 03:25 -0700
                Re: More physical source files Keith Thompson <kst-u@mib.org> - 2015-07-05 09:18 -0700
                Re: More physical source files James Kuyper <jameskuyper@verizon.net> - 2015-07-05 14:11 -0400
                Re: More physical source files Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-07-05 13:41 -0700
                Re: More physical source files Tim Rentsch <txr@alumni.caltech.edu> - 2015-07-10 19:00 -0700
                Re: More physical source files Tim Rentsch <txr@alumni.caltech.edu> - 2015-07-10 18:57 -0700
                Re: More physical source files James Kuyper <jameskuyper@verizon.net> - 2015-07-04 12:50 -0400
      Re: More physical source files Bartc <bc@freeuk.com> - 2015-06-29 17:20 +0100
  Re: More physical source files Rosario19 <Ros@invalid.invalid> - 2015-06-28 11:57 +0200

csiph-web