SC22/WG14 N773 J11/97-137 Changes adopted by WG14 Consistency and clarification changes Clive D.W. Feather clive@demon.net 1997-09-25 Specific items ============== Item 1 [Was N720 item DR 132] ---------------------- Add to 3.18, as a new paragraph 3: The implementation must successfully translate a given program unless it can determine that every possible execution of that program would result in undefined behaviour. Item 2 [Was N720 item DR 116] ---------------------- In 6.2.2.1, add to paragraph 3: If the array object has register storage class, the behaviour is undefined. Item 3 [Was N720 item DR 109] ---------------------- In 6.3.8 paragraph 5, change: ... the result is undefined: ... to: ... the behaviour is undefined: ... Item 4 [Was N720 item DR 074] ---------------------- In 6.5.2.1 paragraphs 12 and 14, delete: "as necessary to achieve the appropriate alignment" Item 7 [Was N720 item DR 079] ---------------------- Append to 7.1.2, as a new paragraph 6: Any declaration of a library function shall have external linkage. Item 9 [Was N735 item 4] ----------------- Part A ------ In subclause 7.1.4 paragraph 1, change: EDOM EILSEQ ERANGE which expand to integral constant expressions with distinct nonzero values, suitable for use in #if preprocessing directives; to: EDOM EILSEQ ERANGE which expand to integral constant expressions with type /int/, distinct positive values, and which are suitable for use in #if preprocessing directives; [Note the change from "nonzero" to "positive" to be consistent with the term "positive error number" later in the paragraph.] Part B ------ In subclause 7.11 paragraph 3, change: ... which expand to positive integral constant expressions with distinct values ... to: ... which expand to positive integral constant expressions with type /int/ and distinct values ... Part C ------ In subclause 7.13.1 paragraph 3, change: EOF which expands to a negative integral constant expression that is returned by several functions ... to: EOF which expands to an integral constant expression, with type /int/ and a negative value, that is returned by several functions ... Part D ------ In subclause 7.16.1 paragraph 2, change: CLOCKS_PER_SEC which is the number per second of the value returned by the /clock/ function. to: CLOCKS_PER_SEC which expands to a constant expression with the type /clock_t/ described below, and which is the number per second of the value returned by the /clock/ function. Item 10 [Was N720 item DR 086] ---------------------- In 7.1.7, modify the words: ... additionaly implemented as a macro defined in the header ... by inserting "function-like" before "macro". Item 11 [Was N720 item DR 148] ---------------------- In 7.1.8 paragraph 1, change: ... so a library function should not be declared explicitly if its header is included. to: ... so if a library function is declared explicitly when its header is included, one of the techniques shown below can be used to ensure the declaration is not affected by such a macro. Item 12 [Was N735 item 7] ----------------- There are a couple of places where is less than clear. Attach a footnote to subclause 7.3.1.2 (isalpha()), referenced at the end of the first sentence of paragraph 2: ... or isspace is true.[*] In the "C" locale ... [*] The functions islower() and isupper() test true or false separately for each of these additional characters; all four combinations are possible. In subclause 7.3.2.1 (tolower()), change the text from: Description The tolower function converts an uppercase letter to the corresponding lowercase letter. Returns If the argument is a character for which isupper is true and there is a corresponding character for which islower is true, the tolower function returns the corresponding character; otherwise, the argument is returned unchanged. to: Description The tolower function converts an uppercase letter to | a corresponding lowercase letter. Returns If the argument is a character for which isupper is true and there | are one or more corresponding characters for which islower is true, | the tolower function returns one of the corresponding characters | (always the same one for any given locale); otherwise, the argument is returned unchanged. and make the corresponding changes to subclause 7.3.2.2 (toupper()), 7.18.3.1.1 (towlower()) and 7.18.3.1.2 (towupper()). Item 14 [Was N735 item 3] ----------------- Add to the end of 7.12 paragraph 3 a reference to the following footnote: [*] It is permitted to create a pointer to a va_list and pass that pointer to another function, in which case the original function may make further use of the original list after the other function returns. Item 15 [Was N720 item DR 137] ---------------------- In 7.13.6.1 and 7.19.2.1, change footnotes 201 and 254 to: [201/254] The results of all floating conversions of a negative zero, and of negative values that round to zero, include a minus sign. Item 16 [Was N720 item DR 151] ---------------------- In 7.13.6.1 and 7.19.2.1, '#' flag, change: ... the first digit of the result to be a zero. to: ... the first digit of the result to be a zero (if the value and precision are both 0, a single 0 is printed). Item 17 [Was N720 item DR 167] ---------------------- In 7.13.6.1 and 7.19.2.1, 'n' specifier, change the last sentence to: No argument is converted, but one is consumed. If the conversion specification with this conversion specifier is not one of %n, %ln, %lln, or %hn, the behaviour is undefined. In 7.13.6.2, 'n' specifier, add %lln to the list. In J.2, add: A %n conversion specification for the fprintf or fscanf functions is not one of %n, %ln, %lln, or %hn. (7.13.6.1, 7.13.6.2, 7.19.2.1, 7.19.2.2). Item 19 [Was N720 item DR 161] ---------------------- In 7.20 (a total of 8 places), change each instance of: (followed by any combination of digits, letters, and underscore) to: (possibly followed by any combination of digits, letters, and underscore) Item 20 [Was N720 item DR 133] ---------------------- Add the list of items in the DR to subclause J.2. Item 21 [Was N720 item DR 168] ---------------------- In J.2 referring to 6.3, add "a type compatible with" in the places that TC1 changed 6.3 itself.