Mail Archives: djgpp/1997/02/27/21:22:15
On Thu, 27 Feb 1997 08:59:19 -0800 Erik Max Francis <max AT alcyone DOT com>
writes:
>nikki wrote:
>
>> just a thought, but putting 'static' before global variables and
>> compiling
>> with -Wall will show unusued global variables too. as well as local
>> unused
>> ones.
>
>Those are static external, not external (e.g., global). The static
>qualifier before a variable definitions outside of any block means
>that the
>linkage is internal to that file. You can't reference it in another
>file.
>
>In other words, it's _not_ global across files if you do this.
Isn't that what's wanted? When you try to link, you'll get an error
saying that the link whatever can't be found - now you KNOW that that
variable was accessed (else it wouldn't generate an error).
...Chambers
- Raw text -