lupton@uhccux.uhcc.hawaii.edu (Robert Lupton) (01/19/90)
Is there a way to stop gcc -Wall complaining about functions declared to be static? It seems to think that they are unused variables. Robert
lupton@uhccux.uhcc.hawaii.edu (Robert Lupton) (01/21/90)
(A repost, with more explanation and example code) The following code, compiled with gcc 1.36 (-Wall) complains `func', defined but not used. at the start of the definition of func() /**************************************************************/ int main() { static void func(); func(); return(0); } static void func() { int printf(); printf("Hello, World\n"); } /**************************************************************/ The only way that I can get rid of this warning is to move the definition of func above main() in the file, and remove the line `static void func()'. This seems like a bug to me, as it means that I must move static little functions to the top of the source file, ahead of the globally interesting stuff. Robert