Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!usc!cs.utexas.edu!sun-barr!ames!uhccux!lupton From: lupton@uhccux.uhcc.hawaii.edu (Robert Lupton) Newsgroups: gnu.gcc.bug Subject: static functions with gcc -Wall Keywords: gcc 1.36 Message-ID: <6281@uhccux.uhcc.hawaii.edu> Date: 21 Jan 90 03:24:32 GMT Organization: University of Hawaii Lines: 34 (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