Document: ISO/WG14 N705/J11-068
Title: Defect Reports since TC2 that promise some action for C9X.
Date: 23-May-97
Author: J. Benito (jb@peren.com)

This document attempts to identify all Defect Reports that have been logged since TC2 that have promised some action for C9X. All the Defect Preports since TC2 are listed, the ones identified as No Action Pending have been addressed by the committee, and do not effect C9X. The Defect Reports identified as Defect not Answered by Committee are defect reports where the Committee has not reached a final decision, these are still open. All other Defect Reports indicate some action to be taken for C9X. The headings for these are inconsistent as are the Defect Reports, I did not edit the text.

The HTML source for this document contains the necessary links to all the Defect Reports listed.

Defect Report 143 Suggested Future Change
The current C Standard has correct meaning, but the wording could be clearer. We suggest the following change for the revised C Standard:
The argument mode points to a string. The mode is determined by the string's longest initial match to the following sequences; at least the initial character shall match:
Defect Report 144 Suggested Future Change
The current C Standard has correct meaning, but the wording could be clearer. We suggest the following change for the revised C Standard:
A preprocessing directive consists of a directive consists of a sequence of preprocessing tokens that begins with a # preprocessing token that (at the start of translation phase 4) is either ...
Defect Report 145 Future Change
In subclause 6.4 Sematics, change:
More latitude is permitted for constant expressions in initializers. Such an expression shall evaluate to one of the following:
to:
More latitude is permitted for consant expressions in initializers. Such an expression shall be, or evaluate to, one of the following :
and change:
An address constant is a pointer to an lvalue designating an object of static storage duration, or to a function designator; it shall be created explicitly, using the unary & operator, or implicity, by the use of an expression of array or function type.
to:
An address constant is a null pointer, a pointer to an lvalue designating an object of static storage duration, or a pointer to a function desingator. It shall be created explicitly using the unary & operator or an integral constant expression cast to pointer type, or implicitly by the use of an expression of array or function type.
Defect Report 146 Suggested Future Change:
Delete the constraint in subclause 6.1.2.

Defect Report 147 Response
We agree that the current wording does not make this clear. The next revision of the C Standard will clarify that every function return is a sequence point. The suggested changes will be used.

Suggested Changes:
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).
Add a reference to 7.1.7 in the Forward References of 5.1.2.3, and in the relevant Index entry.

Defect Report 148 No Action Pending

Defect Report 149 Response
The next revision of the C Standard will use the term "object" instead of "variable" uniformly.

Defect Report 150 Suggested Future Change
In subclause 6.5.7, change:
All the expressions in an initializer for an object that has static storage duration or in an initializer list for an object that has aggregate or union type shall be constant expressions.
to:
All the expressions in an initializer for an object that has static storage duration or in an initializer list for an object that has aggregate or union type shall be constant expressions or string literals.

Defect Report 151 No Action Pending

Defect Report 152 No Action Pending

Defect Report 153 No Action Pending

Defect Report 154 No Action Pending

Defect Report 155 Technical Corrigendum
In subclause 7.10.3, change the next to last sentence to read:
If the size of the space requested is zero, the behavior is implementation defined: either a null pointer is returned, or the behavior is as if the size were some unspecified nonzero value, except that the returned pointer shall not be used to access an object.

Defect Report 156 Technical Corrigendum
In subclause 7.9.9.2, page 145, change:
... an earlier successful call to the ftell function on the same stream ...
to:
... an earlier successful call to the ftell function on a stream associated with the same file ...
In subclause 7.9.9.3, page 146, change:
... an earlier successful call to the fgetpos function on the same stream.
to:
... an earlier successful call to the fgetpos function on a stream associated with the same file.

Defect Report 157 No Action Pending

Defect Report 158 Future Change
In subclause 6.2.2.3, change:
Two null pointers, converted through possibly different sequences of casts to pointer types, shall compare equal.
to:
Conversion of a null pointer to another pointer type yields a null pointer of that type. Any two null pointers shall compare equal.

Defect Report 159 Suggested Technical Corrigendum:
In the Introduction, change:
The introduction, the examples, the footnotes, the references, and the annexes are not part of this International Standard.
The language clause (clause 7) ...
The library clause (clause 8) ...
to:
As specified in the definitions and conventions clause (clause 3), this introduction, the examples, the footnotes, the references, and the annexes are not part of this International Standard.
The language clause (clause 6) ...
The library clause (clause 7) ...
Insert at the start of clause 3:
The introduction, the examples, the footnotes, the references, and the annexes are not part of this International Standard.

Defect Report 160 Suggested Future Change
In subclause 7.1.3, Reserved Identifiers, change bullet 2 to:
All identifiers that begin with an underscore are always reseved for use as macros and as identifiers with file scope in both the ordinary and tag name spaces.
Change bullet 5 to:
Each identifier with file scope listed in any of the following subclauses (including the Future library directions) is reserved for use as a macro and as an identifier with file scope in the same name space if any of its associated headers is included.
Defect Report 161 No Action Pending

Defect Report 162 Future Change
In subclause 7.12.3, change:
Except for the strtime function, these functions return values in one of two static objects: a broken-down time structure and an array of char. Execution of any of the functions may overwrite the information returned in either of these objects by any of the other functions.
to:
Except for the strtime function, these functions each return a pointer to one of two types of static objects: a broken-down time structure or an array of char. Execution of any of the functions that return a pointer to one of these object types may overwrite the information in any object of the same type pointed to by the value returned from any previous call to any of them.
Defect Report 163 Response
Identifiers that designate objects must be declared and be visible before they can be primary expressions (subclause 6.1.2.1, An identifier is visible (i.e., can be used) ...). A reasonable person could interpret that if no declaration of some identifier is visible, the identifier cannot be a primary expression. This affects undeclared identifiers that are intended to be used as implicitly declared functions. The Committee's intent is that the C Standard be read in the following order:
1. 6.3.1 Primary expressions
Syntax
primary-expression:
identifier

2. 6.3.2.2 Function calls
Semantics
If the expression that precedes the parenthesized argument list in a function call consists solely of an identifier, and if no declaration is visible for this identifier, the identifier is implicitly declared exactly as if, in the innermost block containing the function call, the declaration
extern int identifier();
appeared.
3. 6.3.1 Primary expressions
Semantics
An identifier is a primary expression, provided it has been declared as designating ... a function (...).
However, a reasonable person may not interpret the current wording as having that meaning (i.e., it might not be read in that order). This needs to be clarified in the next revision of the C Standard.

Defect Report 164 No Action Pending

Defect Report 165 Defect not Answered by Committee

Defect Report 166 Defect not Answered by Committee

Defect Report 167 Defect not Answered by Committee

Defect Report 168 Defect not Answered by Committee

Defect Report 169 No Action Pending

Defect Report 170 Response
This is a work in progress item.
General feeling is that this should be cleaned up for C9X along the lines of C++ pp-punctuator grammar.
Suggested response is to add words to subclause 6.1.5 along the lines, shall occur in pairs within expressions...

Defect Report 171 Defect not Answered by Committee

Defect Report 172 Response
This is a work in progress item.
Summary of Part 1:
The standard does not currently state what happens with relational operators when you compare the address of an object with a null pointer.
We know from the citation from subclause 6.2.2.3 that a null pointer is guaranteed to yield false when compared with a pointer to an object.
It is explicitly undefined behaviour to use relational operators on two pointer that are not members of the same aggregate or union object. However it is unstated whether a null pointer compares greater or less than the address of an object and hence is implicitly undefined behaviour.
Is this the desired behaviour?
Note: the current C++ clause has the following wording:
If two pointers of the same type point to different objects or functions, or only one of them is null, they compare unequal.

This wording gives the possibility for C and C++ to give different results.
Summary of Part 2:
Discussion from Nashua is as follows:
The intent is that pointers to distinct object will compare unequal, The C Standard will be fixed in a future revision.

Defect Report 173 Defect not Answered by Committee

Defect Report 174 Defect not Answered by Committee

Defect Report 175 Defect not Answered by Committee

Defect Report 176 Defect not Answered by Committee

Defect Report 177 Defect not Answered by Committee

Defect Report 178 Defect not Answered by Committee