Document Number: WG14 N692/J11 97-055 C9X Revision Proposal ===================== Title: ____Implicit int cleanup_____________________________ Author: _____________Larry Jones____________________________ Author Affiliation: _SDRC___________________________________ Postal Address: _____2000 Eastman Dr, Milford, OH 45150_____ E-mail Address: _____larry.jones@sdrc.com___________________ Telephone Number: ___513-576-2070___________________________ Fax Number: _________513-576-2843___________________________ Sponsor: ____________Larry Jones____________________________ Date: _______________19 May 1997____________________________ Proposal Category: X_ Editorial change/non-normative contribution __ Correction __ New feature __ Addition to obsolescent feature list __ Addition to Future Directions __ Other (please specify) Area of Standard Affected: __ Environment __ Language __ Preprocessor __ Library __ Macro/typedef/tag name __ Function __ Header __ Other (please specify) ______________________________ Prior Art: _________________________________________________ Target Audience: ___________________________________________ ____________________________________________________________ ____________________________________________________________ Related Documents (if any): N635, N636, N661________________ ____________________________________________________________ ____________________________________________________________ Proposal Attached: X_ Yes __ No, but what's your interest? Abstract: At previous meetings, the committee has voted to remove various ``implicit int'' declarations from the language, but some references to these implicit declarations remain in the draft. This proposal corrects these oversights and adds rationale. (Section and paragraph numbers correspond to Draft 9.) Proposal: In subclause 6.7.1 Function definitions, Example 2, remove the sentence ``Note that f must be declared explicitly in the calling function, as its appearance in the expression g(f) was not followed by (.''. In subclause 7.1.7 Use of library functions, paragraph [#2], first sentence, remove the text ``, either explicitly or implicitly,'', and remove the second sentence (``If a function that accepts a variable number of arguments is not declared (explicitly or by including its associated header), the behavior is undefined.''). In subclause I.2 Undefined behavior, remove the item: -- A library function that accepts a variable number of arguments is not declared (7.1.7). In the Rationale, subclause 6.3.2.2 Function calls, replace paragraph 4: The rule for implicit declaration of functions has been retained, but various past ambiguities have been resolved by describing this usage in terms of a corresponding explicit declaration. with: The rule for implicit declaration of functions has been removed. The effect is to guarantee that a diagnostic is produced, which will catch an additional category of programming errors. After issuing the diagnostic, an implementation may choose to assume an implicit declaration and continue translation in order to support existing programs that exploited this feature. In the Rationale, subclause 6.7.1 Function definitions, add a new paragraph: The rule which caused undeclared parameters in an old-style function definition to be implicitly declared int has been removed; undeclared parameters are now a constraint violation. The effect is to guarantee that a diagnostic is produced, which will catch an additional category of programming errors. After issuing the diagnostic, an implementation may choose to assume an implicit int declaration and continue translation in order to support existing programs that exploited this feature.