This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
implicit declaration of static attribute for functions????
- To: <gcc-help at gcc dot gnu dot org>
- Subject: implicit declaration of static attribute for functions????
- From: "Jerry Miller" <gmiller at cs dot sunysb dot edu>
- Date: Wed, 28 Mar 2001 13:51:23 -0500
- References: <3AC1ED6E.68B4E75E@airsys.thomson-csf.com>
In making enhancements to a very large project,
I found it necessary to make use of a function
that had been short-sightedly made static, and
thus local to the module containing it. I removed
the static attribute from both the prototype
declaration and the function itself.
I recompiled and relinked, but I got a message
from the linker that the reference was unresolved.
Noting that the function in question was at the
very end of the module, following several static
functions, on a hunch, I cut and pasted to the
very beginning of the module, which solved the
problem!
Why should this be necessary???