1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-27 00:29:31 +00:00
cc65/test/err/bug2304-var-use.c

16 lines
298 B
C

/* Bug 2304 - Visibility of objects/functions undeclared in file scope but 'extern'-declared in unrelated block scopes */
void f1(void)
{
extern int a;
}
/* 'a' is still invisible in the file scope */
int main(void)
{
return a * 0; /* Usage of 'a' should be an error */
}
int a = 42;