Subject: Re: interrupt_reg variable
To: Andy <andy@softbook.com>
From: Bill Studenmund <wrstuden@zembu.com>
List: port-macppc
Date: 07/07/2000 14:09:12
On Thu, 6 Jul 2000, Andy wrote:

> hmm, and the linker is happy with the two same name/type variable
> declarations? Neither of them is declared extern..

Yes, it is. It would complain if both declarations had initialized values.

Something like "int foobar;" in global scope is kinda an extern int foobar
and kinda not. If there is no other global "foobar" variable, it defines
one. Otherwise, it acts as an "extern int foobar;".

This behavior is a reflection of what was needed to make fortran COMMON
blocks work. There one .o would define a common block and shove stuff in
it. Other .o's would just refer to that COMMON block and access what was
in it.

Take care,

Bill