On 'unused parameter' warnings

Tim Prince tprince@myrealbox.com
Sun Jul 29 16:13:00 GMT 2007


Steve Kargl wrote:
> On Sun, Jul 29, 2007 at 08:49:05AM +0200, Angelo Graziosi wrote:
>   
>> On Sat, 28 Jul 2007, Steve Kargl wrote:
>>
>>     
>>> On Sun, Jul 29, 2007 at 01:16:49AM +0200, Angelo Graziosi wrote:
>>>       
>>>> With recent GFortran, building old F77 (Cernlib applications) code, one
>>>> gets a lot of "'unused parameter' warnings".
>>>>
>>>> Is there an option to suppress those warnings (that are very annoying)?
>>>>
>>>>         
>>> You have a few options: 1) fix the code.
>>>       
>> Do you know CERNLIB (http://cernlib.web.cern.ch/cernlib)?
>>     
>
> I do not know CERNLIB, but would seem to be poorly written
> code if a large number of warnings are issued.
>   
This appears to be a normal consequence of using INCLUDE to bring in a 
common set of declarations into many subroutines.  It probably dates 
back before the time when modules and USE..., only were widely 
accepted.  Note that much of the documentation was written 10 to 12 
years ago.  It's still important enough to be an example of the chicken 
and egg dilemma.  Compilers don't need to optimize modules well, because 
well known applications like this don't use them, partly because they 
could lose performance.



More information about the Fortran mailing list