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] |
Consider the following test case:
A.c: int foo = 12; B.c: extern int printf(const char *, ...); extern int foo;
int main(void) { printf("%d\n", foo); return 0; }
static int foo = 14;
Taken together, this is a correct C program which should print 14.
If, within a translation unit, the same identifier appears with both internal and external linkage, the behavior is undefined.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |