This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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]

Re: Confusing error message


>  this error message seems confusing to me:
>
>   f(x) = x*x
>   print *, f(2.0)
> end
>
>> gfortran obsol.f90 -pedantic -Werror
> obsol.f90:2.1:
>
>  f(x) = x*x
>  1
> Error: Unclassifiable statement at (1)

Agreed. Using -pedantic only, one gets the expected

  f(x) = x*x
            1
Warning: Obsolescent feature: Statement function at (1)


In principle I would expect that -Werror turns this into "Error:
Obsolescent feature: ..."

So it seems like -Werror is broken in this case.

Btw, for the following:

real :: y
end

I get with both -Wall and -Wall -Werror:

  real :: y
           1
Warning: Unused variable 'y' declared at (1)


With the additional -Werror I would expect to see "Error: Unused
variable ...". Is this another case of -Werror being broken, or are my
expectations misguided?

Cheers,
Janus


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