This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

G77 warnings as errors



All warnings in my fortran code stop compilation with an error code.
The obvious work around (other than writing cleaner code) is to run
with warnings turned off (-w or -W...) but i like to see the warnings.

[I tried to submit this as a GNAT but for some reason that failed.
  I hope this is the correct place for this.]

For example, on my machine: "g77 -c foo.f" will fail, not just spew
out the appropriate warning.

-- begin foo.f --
         subroutine foo(N,A,ii)
         integer N,ii(N),iptr
         real*8 A(N)

         call c_bzero(ii,N*4)
         call c_bzero(A ,N*8)
         iptr = memDgrab(N*N)
         call c_bzero(%val(iptr), N*N*8)

         return
         end
--- end foo.f ---

apologies for the obvious bad code.  This is just an example.

-- 
Dr. Philip Klunzinger
Computational Chemist
Wavefunction, Inc.   :: www.wavefun.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]