C expert: Too Much Default Visibility

 C expert:  Too Much Default Visibility   
Whenever you define a C function, its name is globally visible by default. You can prefix the function
name with the redundant extern keyword or leave it off, and the effect is the same. The function is
visible to anything that links with that object file. If you want to restrict access to the function, you are
obliged to specify the static keyword.
function apple (){ /* visible everywhere */ }
extern function pear () { /* visible everywhere */ }
static function turnip(){ /* not visible outside this file */ }
In practice, almost everyone tends to define functions without adding extra storage-class specifiers, so
global scope prevails.

你可能感兴趣的:(C expert: Too Much Default Visibility)