Nice compiler options

Gfortran is my main compiler and is excellent, but g95 is my sentimental favorite and has good compile-time checks. It does not support much of Fortran 2003 and beyond.

The result of compiling the code above with the options I use, g95 -c -Wall -Wextra -Wimplicit-none -Werror=100,113,115,137,146,147,159,163 -ftrace=full -fbounds-check -freal=nan -fmodule-private -Wno=112,167 is

In file xxmain.f90:9

type(Foo) :: f
             1

Error (113): Variable ‘f’ at (1) is used but not set

1 Like