Updates to K&R 2

Christopher Beierl beierl_c at apollo.COM
Fri Jun 2 03:29:00 AEST 1989


    I obtained the following updates to K&R 2 on a Xeroxed sheet at my
local bookstore.  I trust Brian and Dennis won't mind my posting it here.
                                   -Chris

----------------------------------------------------------------------------
            Changes to _The_C_Programming_Language,_2nd_Edition_

    Now that X3J11 has voted to send its draft to X3, and further substantive
changes in the draft standard are unlikely, Brian and I are preparing fixes
to put in any future printings of the second edition of _The_C_Programming_
Language_.  Fortunately, they are minor.  For the benefit of previous and
near-future purchasers, here are the changes that were made:

Two or three sentences in the Preface and Introduction are updated to de-
scribe the state of the Standard.

Minor typos are corrected on pages 87, 89, 164, 165, 168, 180; also 71, 76,
82, 121 atof is in <stdlib.h>, not <math.h>.

The inconspicuous references to noalias on pages 192 and 211 are removed.

The following paragraph is added to the end of section A6.6 (p 199):

    A pointer may be converted to another pointer whose type is the same
    except for the addition or removal of qualifiers (A4.4, A8.2) of the
    object type to which the pointer refers.  If qualifiers are added, the
    new pointer is equivalent to the old except for restrictions implied
    by the new qualifiers.  If qualifiers are removed, operations on the
    underlying object remain subject to the qualifiers in its actual
    declaration.

On p.199, beginning of section A6.8, "Any pointer may be converted to type
void *..." is changed to "Any pointer >to an object< may be converted to
type void*...".

On p.204, A7.4.4, "The operand of the unary + operator must have arithmetic
or pointer type..." should read "must have arithmetic type...".

On p.206, A7.9, about relational operators: "Pointers to objects of the
same type may be compared..." is changed to "Pointers to objects of the
same type >(ignoring qualifiers)< may be compared...".

The indented material on p.209, "According to the restrictions...  relaxing
it." is removed.  [This is related to the paragraph added above.  The
wording of the draft of a year ago made it useless to take an (int *)
pointer, cast it to (const int *), then cast it back to (int *).]

On p.219 middle, initialization of structures, add "Unnamed bit-field
members are ignored, and are not initialized."

Appendix B changes:
p 242: Add "fflush(NULL) flushes all output streams." to fflush description.

p 243: Change to "it must be called before reading, writing >or any other
operation<" in setvbuf description.

p 249: Add "Comparison functions treat arguments as unsigned char arrays."
to <string.h> description.

p 255: Change range of tm_sec to (0,61) for leap seconds.

p 255: Change CLK_TCK to CLOCKS_PER_SEC.

p 257: Drop U and L suffixes from <limits.h> constants.  tm_sec range is
(00,61) here too.

Appendix C changes:
p 261: Change "External declarations without any specifiers..." to "External
>data< declarations without any specifiers...".

The index has been reprinted to fix a couple of typos and account for motion
within Appendix A; one page of the table of contents is changed.
-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Christopher T. Beierl                         Internet: beierl_c at apollo.com
 Apollo Computer, Inc.      UUCP: {mit-eddie,yale,uw-beaver}!apollo!beierl_c
 A Subsidiary of Hewlett-Packard                       Phone: (508) 256-6600



More information about the Comp.lang.c mailing list