Public Comment Number PC-____ ISO/IEC CD 9899 (SC22N2620) Public Comment =========================================== Date: 1998-02-19 Author: Clive D.W. Feather Author Affiliation: Self Postal Address: Demon Internet Limited 322 Regents Park Road London N3 2QQ United Kingdom E-mail Address: Telephone Number: +44 181 371 1138 Fax Number: +44 181 371 1037 Number of individual comments: 1 Comment 1. Category: Inconsistency Committee Draft subsection: 5.1.2.2.1, 5.1.2.2.3 Title: Alternate forms of main() are not well-enough defined Detailed description: 5.1.2.2.1 permits main() to have other implementation-defined types. These types might not include a return type of int. 5.1.2.2.3p1 reads: A return from the initial call to the /main/ function is equivalent to calling the /exit/ function with the value returned by the /main/ function as its argument.[10] If the } that terminates the /main/ function is reached, the termination status returned to the host environment is unspecified. The first sentence is clearly nonsense if the return type of main() is not convertable to int. Change 5.1.2.2.3p1 to: If the return type of the /main/ function is a type compatible with /int/, then a return from the initial call to the /main/ function is equivalent to calling the /exit/ function with the value returned by the /main/ function as its argument.[10] If the } that terminates the /main/ function is reached, or the return type of the /main/ function is not a type compatible with /int/, the termination status returned to the host environment is unspecified.