15-02-2012, 07:30 PM
Given this example
Does this code violate rule #8.7, "Objects shall be defined at block scope if they are only accessed from within a single function"?
Code:
file1.c:
static int i;
int j[1] = { i };
file2.c:
extern int j[1];
void f()
{
int k = j[0];
}