RFC PR31162 missing warning for real do-loops with implicit typed variables

Brooks Moses brooks.moses@codesourcery.com
Fri Jun 15 06:40:00 GMT 2007


Jerry DeLisle wrote:
> This PR is a bit mis-stated.  The problem here is that we are not giving any 
> warnings if the START, END, or STEP expressions of the DO LOOP are real.
> 
> I have a patch that fixes this by giving these warnings.
> 
> My question is:  Should gfortran issue warnings regardless of flags except the 
> usual -w mechanism or only warn if -std=f95, -std=f2003, or -pedantic.
> 
> IFORT only warns if -stand f95 as an example, otherwise it accepts real values 
> and loop variables.
> 
> Right now gfortran warns "always" if the loop variable is real.

The F95 standard requires that the START, END, and STEP expressions be 
scalar int expressions.  Thus, using real expressions in those locations 
falls under the "Real Loop Variables" deleted feature, and we should use 
GFC_STD_F95_DEL for this.

- Brooks



More information about the Fortran mailing list