Public Comment Number PC-UK0106 ISO/IEC CD 9899 (SC22N2620) Public Comment =========================================== Date: 1998-02-25 Author: N.M Maclaren Author Affiliation: Self Postal Address: University of Cambridge, Computer Laboratory, New Museums Site, Pembroke Street, Cambridge CB3 3QG, United Kingdom E-mail Address: Telephone Number: +44 1223 334761 Fax Number: +44 1223 334679 Number of individual comments: 1 Comment 1. Category: Feature that should be removed Committee Draft subsection: 6.5.4 Title: Function specifiers Detailed description: Paragraph 6 is extremely confusing, and complicates an extremely tricky area of the standard still further, which is very likely to lead to the sort of implementation problems that bedevilled the implementation of linkages in early C89 compilers. The inline specifier seems to create a new sort of linkage, but is not described in those terms. Consider the following declarations with file scope: inline double joe (void) { return 0.0; } double joe (void); joe has to have external linkage because it has not been declared to have internal linkage (by 6.1.2.2), and is a definition, but is not an external definition (by this section.) So precisely what is the linkage of an inline definition? Some people believe it has no linkage, but I can find no wording anywhere in the standard that states this explicitly. Also, paragraphs 7 and 8 are misleading, and arguably incorrect as they are currently worded. In particular, "A file scope declaration with extern creates an external definition." Consider the following: static double fred (void); inline double fred (void) { return 0.0; } extern double fred (void); Unless this section can be integrated closely enough with the rest of the standard (especially 6.1.2.2 Linkages of identifiers, 6.7 External definitions and 6.7.1 Function definitions) to avoid most implementors getting confused, I suggest deleting it completely.