[patch, fortran] PR31162 missing warning for real do-loops with implicit typed variables

Tobias Burnus burnus@net-b.de
Thu Jun 21 19:50:00 GMT 2007


:REVIEWMAIL:

Jerry DeLisle wrote:
> ! 	  if (real_ok)
> ! 	    return gfc_notify_std (GFC_STD_F95_DEL, "Obsolete: %s at %L should"
> ! 				   " be integer", _(name_msgid), &expr->where);
>   
This is not "Obsolete" but "Deleted"; the Fortran standard does not know
about "obsolete" only about "obsolescent" and "deleted". If you look in
Appendix B of the Fortran 95 standard, you find under "B.1 Deleted
features" the section "B.1.1 Real and double precision DO variables".
...

I just saw that gfortran always uses "Obsolete" for deleted features,
you may thus keep the "Obsolete". (However, I personally prefer
something like "Deleted:" or "Deleted feature:" everywhere.)

Additionally, instead of "Obsolete: %s at %L should be integer" (which
almost sounds as if it is obsolete to use integers), I would prefer
something like Obsolete/Deleted feature: "Real DO variable %s at %L".

Another reason for not using "should" is the following. For -std=f95 the
message is:
    Error: Obsolete: Loop variable at (1) should be integer
for the error message "must" woulde be better than "should".
(real_ok is only false for data and io implied-do-loops, but not for
normal do loops.)


Ok for the trunk - as is or with the proposed changes. Thanks for fixing
the PR.

Tobias



More information about the Gcc-patches mailing list