Previous Table of Contents "New C Standard" commentary
translation-unit: external-declaration translation-unit external-declaration
external-declaration: function-definition declaration
The storage-class specifiers
1812 There shall be no more than one external definition for each identifier declared with internal linkage in a translation unit.
Moreover, if an identifier declared with internal linkage is used in
an expression (other than as a part of the operand of a
1814 As discussed in 126.96.36.199, the unit of program text after preprocessing is a translation unit, which consists of a sequence of external declarations.
1815 These are described as external because they appear outside any function (and hence have file scope).
1816 As discussed in 6.7, a declaration that also causes storage to be reserved for an object or a function named by the identifier is a definition.
1817 An external definition is an external declaration that is also a definition of a function (other than an inline definition) or an object.
If an identifier declared with external linkage is used in an
expression (other than as part of the operand of a
1819 otherwise, there shall be no more than one.137)
1820 137) Thus, if an identifier declared with external linkage is not used in an expression, there need be no external definition for it.
Created at: 2008-01-30 02:39:44
The text from WG14/N1256 is copyright © ISO
Created at: 2008-01-30 02:39:44 The text from WG14/N1256 is copyright © ISO