On Mon, 2012-10-08 at 14:19 +0400, Ilya Basin wrote: > test.c: > static void foo(); > > void bar() { > foo(); > } > > $ gcc -c test.c > test.c:1: warning: 'foo' used but never defined > > Why warning and not error? Another *.o can refer this static function? > No, another .o can't refer to this static function. Static functions are visible only in the translation unit where they are defined. The code above will generate a symbol reference to 'foo', i.e. a function call to a non-static function. If it is defined in some other .o and linked together, the 'foo' from the other .o will be used. Cheers, Oleg