"dberlin at gcc dot gnu dot org" <[EMAIL PROTECTED]> writes:
| Nathan tells me it's lk_internal for a CONST_DECL. Where does that come from? There is a section numbered 3.5 and titled "Program and linkage". It says in paragraph 4 A name having namespace scope has external linkage if it is the name of -- an object or reference, unless it has internal linkage; or -- a function, unless it has internal linkage; or -- a named class (clause 9), or an unnamed class defined in a typedef declaration in which the class has the typedef name for linkage purposes (7.1.3); or -- a named enumeration (7.2), or an unnamed enumeration defined in a typedef declaration in which the enumeration has the typedef name for linkage purposes (7.1.3); or -- an enumerator belonging to an enumeration with external linkage; or -- a template, unless it is a function template that has internal linkage (clause 14); or -- a namespace (7.3), unless it is declared within an unnamed namespace. And in paragraph 8, it continues: Names not covered by these rules have no linkage. Moreover, except as noted, a name declared in a local scope (3.3.2) has no linkage. A name with no linkage (notably, the name of a class or enumeration declared in a local scope (3.3.2)) shall not be used to declare an entity with linkage. If a declaration uses a typedef name, it is the linkage of the type name to which the typedef refers that is considered. those clearly indicates to me that the linkage of a CONST_DECL depends on the linkage of its enumeration. | fixing. Please look at section 3.5 before fixing this. (besides an numeration does not have storage). -- Gaby