When compiling with -Wall g77 marks all variables passed through COMMON as unused. This practically nullifies a usefulness of this warning. Attached sample program when compiled with g77 from 6.2 distribution (egcs) produces the following: mdbnch2.f: In subroutine `minit': mdbnch2.f:315: warning: unused variable `cf' mdbnch2.f: In subroutine `mstep': mdbnch2.f:881: warning: unused variable `chart' mdbnch2.f:881: warning: unused variable `chars' mdbnch2.f:881: warning: unused variable `chard' mdbnch2.f: In subroutine `crystl': mdbnch2.f:1978: warning: unused variable `name' which is correct. A new version of compiler generates close to 960 "unused variable" warnings on the same source. Michal michal
Created attachment 3218 [details] sample Fortran source
Fixed in newer compilers. Verified ok with 8.0