-Wall and include

Éric Depagne edepagne@lcogt.net
Thu Aug 9 19:20:00 GMT 2007


Hi all.

I have activated the -Wall option to debug my code.

I would like to know if there is an option to let gfortran know that it should 
treat include with special care?

Let me explain a bit.

The include directive is used to declare some variables that are used by many 
subroutines and only to declare variables. Nothing else but variable 
declarations.

When I compile my code, I get the following warning message:
Definition.inc:4.23:
    Included at compute.f:13:

      INTEGER radius
                      1
Warning: unused parameter 'radius' declared at (1)

I perfectly understand that the warning is true, since I do not use the 
variable radius in the Definition.inc file itself, but I use it in 
compute.f . Thus I would expect that gfortran somehow knows that this 
variable is indeed used somewhere else, specially in the file where the 
inlcude directive is.

Does another compilation exist option to prevent this behaviour?

Thanks a lot.

Éric.

-- 
Un clavier azerty en vaut deux
----------------------------------------------------------
Éric Depagne				edepagne@lcogt.net
Las Cumbres Observatory	
6740 Cortona Dr
Goleta CA, 93117
----------------------------------------------------------



More information about the Fortran mailing list