SC22/WG14 N783 Changes adopted by WG14 Significant outstanding issues Clive D.W. Feather clive@demon.net 1997-10-20 Specific items ============== Item 3 [Was N739 item 11] ------------------ In subclause 6.5.2.1, change paragraph 3 from: The expression that specifies the width of a bit-field shall be an integral constant expression that has nonnegative value that shall not exceed the number of bits in an ordinary object of compatible type. If the value is zero, the declaration shall have no declarator. to: The expression that specifies the width of a bit-field shall be an integral constant expression that has nonnegative value that | shall not exceed the number of bits in an object of the type | that is specified if the colon and expression are | omitted. If the value is zero, the declaration shall have no declarator. Item 6 [Was N720 DR 142] ----------------- Append to 7.1.3: If the program removes (with #undef) any macro definition of an identifier in the first group listed above, the behaviour is undefined. Item 7 [Was N735 item 2] ----------------- Add to 7.13.6: The formatted input/output functions [*] shall behave as if there were a sequence point after the actions associated with each specifier. [*] The printf function performs writes to memory for the %n specifier. Add to 7.19.2: The formatted wide character input/output functions [*] shall behave as if there were a sequence point after the actions associated with each specifier. [*] The wprintf function performs writes to memory for the %n specifier. Item 10 [Was N735 item 14] ------------------ The following text shall be added to the Rationale: If output is buffered, then it may be transmitted to the host environment at any subsequent call to fputc(), and shall be transmitted no later than the next fflush() call or when the stream is closed. Thus a call to fputc() may fail and set the error indicator on the stream because of the earlier output. Similarly, if input is buffered, a call to fgetc() may cause the error indicator to be set even though the same call on an unbuffered stream would not (because the error is associated with a later character in the input). Even if the data is successfully transmitted to the host environment, it is possible for an error to occur within the latter. If this happens after the stream has been closed, it can not be reported to the application; if it occurs earlier, it is implementation-defined when it is so reported. Item 13 [Was N735 item 19] ------------------ Add the following immediately after the heading of 7.14.5 (there is currently no text between that and the heading of 7.14.5.1). [1] These utilities make use of a comparison function. This shall behave in the following way. [2] The implementation shall ensure that the second argument (when called from /bsearch/), or both arguments (when called from /qsort/), shall be pointers to elements of the array [*]. The first argument when called from /bsearch/ shall equal /key/. [*] That is, if the value passed is /p/, then the following expressions are always non-zero: ((char *) p - (char *) base) % size == 0 (char *) p >= (char *) base (char *) p < (char *) base + nmemb * size [3] The comparison function shall not alter the contents of the array. The implementation may reorder elements of the array between calls to the comparison function, but shall not alter the contents of any individual element. [4] When the same object (consisting of /size/ bytes, irrespective of its current position in the array) is passed more than once to the comparison function, the results shall be consistent with one another. That is, for /qsort/ they shall define a total ordering on the array, and for /bsearch/ the same object shall always compare the same way with the key. [5] A sequence point occurs immediately before and immediately after each call to the comparison function, and also between any call to the comparison function and any movement of the objects passed as arguments to that call.