2015-08-13 07:39:35 +00:00
|
|
|
/*
|
|
|
|
!!DESCRIPTION!! global non-static and static conflicts
|
|
|
|
!!ORIGIN!! cc65 regression tests
|
|
|
|
!!LICENCE!! Public Domain
|
|
|
|
!!AUTHOR!! Greg King
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
see: https://github.com/cc65/cc65/issues/191
|
2023-05-12 00:15:27 +00:00
|
|
|
https://github.com/cc65/cc65/issues/2111
|
2015-08-13 07:39:35 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
static int n = 0;
|
2023-05-12 00:15:27 +00:00
|
|
|
extern int n; /* extern is ignored, gives a warning but keeps previous static definiton */
|
|
|
|
static int n; /* no error or warning, the previous static is still in effect */
|
2015-08-13 07:39:35 +00:00
|
|
|
|
|
|
|
int main(void)
|
|
|
|
{
|
|
|
|
return n;
|
|
|
|
}
|