This is the mail archive of the
mailing list for the GCC project.
- From: thomas joseph <thomascanny at yahoo dot co dot nz>
- To: gcc at gcc dot gnu dot org
- Date: Wed, 13 Feb 2002 03:23:59 +1300 (NZDT)
- Subject: extern declaration
I have a small question about extern declaration,
which I found it strange.
/* some code */
extern int **a;
int main ()
int i = a; // Problem here.
So, when I compile gcc -o test test.c test1.c
It compiles properly.When I run test it crashes.
After some time I realized that a is becoming NULL.
How is it happening ? And the linker resolved the
symbol. So it should bind to the proper addreess.
And one more, why are we not accepting some thing
char a; /* want to declare *a* as pointer to char
But the function formal parameter list accepts this.
Any specific reason ?
any explanations would be highly appreciated,
Thanks and regards,