I have only one file in my project called test.c; the code below does not compile if I do not define "TRUE". I use vc. I just want to understand the behavior. Please throw some light on this aspect.
#ifdef TRUE
static int a;
static int a = 1;
#else
static int a = 1;
static int a;
#endif
int main (void)
{
printf("%d\n", a);
return 0;
}
-----------------------
#ifdef TRUE // both ok
int a;
int a = 1;
#else // both ok
int a = 1;
int a;
#endif
int main (void)
{
printf("%d\n", a);
return 0;
}