ISO/ IEC JTC1/SC22/WG14 N675

                    Document Number:  WG14 N675/X3J11 97-038

             Changes related to DRs 77, 143, 144, 146, 147, and 149


Abstract
========

The formal responses to defect reports 77, 143, 144, 146, 147, and 149
all contained the recommendation that the issue should be revisited
during the next revision of the Standard.

At Rex's request, and since I was the original author of these DRs, I
have assembled proposals for changes related to these DRs. I have not
bothered with rationale for these proposals, since the DRs adequately
document the issues anyway. Instead I've just written them as a set of
wording changes (sometimes taken directly from the DR, sometimes not).

The proposal related to each DR stands alone from the others.


DR077
=====
In subclause 6.1.2.4, change the last sentence of paragraph 2 to:

    The object exists, has a constant address, and retains its last-
    stored value throughout the execution of the entire program.[21]

Append to footnote 21:

    The term "constant address" means that two pointers to the object
    constructed at possibly different times will compare equal. The
    address may be different during two different executions of the same
    program.

Add to the end of paragraph 3:

    During execution of the associated block, the object has a constant
    address.

In subclause 7.13.3.4 (realloc ()), append to paragraph 3 (returns):

    If a pointer is returned which does not compare equal to /ptr/, then
    the object has moved and /ptr/ is a pointer that refers to freed
    space.


DR143
=====
In subclause 7.12.5.3 (fopen ()), replace paragraph 3 with:

    The argument /mode/ points to a string. The file is opened in the
    mode determined by the longest initial subsequence of this string
    that matches one of the following sequences:

        /r/     open text file for reading
        [existing list is left unchanged]

    If the string does not begin with any of these sequences, the
    behaviour is undefined.[169]

    [169] Implementations may interpret the presence or absence of
    additional characters following these sequences (for example, a
    following /0/ might affect the number of null characters appended to
    the end of a binary stream). However, this interpretation may not
    affect any behaviour defined by this International Standard.


DR144
=====
In subclause 6.8, change paragraph 2 to read:

    A preprocessing directive consists of a sequence of preprocessing
    tokens that begins with a # preprocessing token that (at the start
    of translation phase 4) is either ...

Add, after paragraph 6:

    Example

    In:

        #define EMPTY
        EMPTY # include <file.h>

    the sequence of preprocessing tokens on the second line is *not* a
    preprocessing directive, because it does not begin with a # at the
    start of translation phase 4, even though it will do so after the
    macro /EMPTY/ has been replaced.


DR146
=====
Delete the constraint in subclause 6.1.2, as it is nugatory.


DR147
=====
Add to the end of subclause 7.1.7:

    There is a sequence point immediately before a library function
    returns.

Add to the end of Annex C:

    - Immediately before a library function returns (7.1.7).


DR149
=====
In subclause 7.10.1.1 paragraph 4, replace:

    ... assigning a value to a static storage duration variable of type
    /volatile/ ...

with:

    ... assigning a value to an object declared as /volatile/ ...

-- 
Clive D.W. Feather    | Associate Director  | Director
Tel: +44 181 371 1138 | Demon Internet Ltd. | CityScape Internet Services Ltd.
Fax: +44 181 371 1150 | <[email protected]>   | <[email protected]>
Written on my laptop - please reply to the Reply-To address <[email protected]>