This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Dale Johannesen <dalej@apple.com> writes:
Are you sure? 6.2.2p4 looks unambiguous that the first declaration does have external linkage, but I remember finding a place that said that a declaration with 'extern' and no initializer had indeterminate linkage, which the subsequent declaration with 'static' retroactively rendered into internal linkage.
This is correct, you're thinking of 6.9.2. Your example is valid.
I don't follow your logic.
static int i2=2; extern int i2; /*refers to previous, internal linkage */
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |