static declaration of foo follows non-static declaration

Andrew Haley aph-gcc@littlepinkcloud.COM
Mon Jun 11 14:14:00 GMT 2007


Dhiraj.Nilange@iflexsolutions.com writes:
 > 
 > Hi,
 > 
 > During gcc compilation of  C code I am getting these strange errors
 > (compile time):-
 > 
 > 
 > error: static declaration of foo follows non-static declaration
 > 
 > error: previous implicit declaration of foo was here
 > 
 > 
 > foo is some function here. These errors are surprising, because there is
 > only one definition of the function foo. Moreover this code perflectly
 > gets compiled using IBM's xlr_c and HP's aCC. So I guess this is gcc
 > specific issue. Please help!

OK.  Please show us a small self-contained example of this problem.

Andrew.



More information about the Gcc-help mailing list