[Patch, fortran] PR26787 - Standard references

Steve Kargl sgk@troutmask.apl.washington.edu
Thu Apr 13 22:20:00 GMT 2006


On Fri, Apr 14, 2006 at 12:08:20AM +0200, Paul Thomas wrote:
> Steve,
> 
> >
> >Can you add the section number from the standard to above?  For example,
> >/* From 12.2.3, a procedure symbol cannot ... */
> >
> >
> My draft copy of the F95 standard does not have a 12.2.3.
> 
> I have:
> 
> R735  assignment-stmt     is    variable  =  expr
> R601  variable            is    scalar-variable-name
>                          or    array-variable-name
>                          or    subobject
> 
> 
> After that, the closest that I find to a usable definition is
> 
> 12.5.2.2, Note 12.26:
> 
> The result variable is very similar to any other variable local to a 
> function subprogram.  Its existence begins when execution of the 
> function is initiated and ends when execution of the function is 
> terminated.  However, because the final value of this variable is used 
> subsequently in the evaluation of the expression that invoked the 
> function, an implementation may wish to defer releasing the storage 
> occupied by that variable until after its value has been used in the 
> expression evaluation.
> 
> What I have tried to implement is consistent with this, so this seems 
> like the correct reference.  Perhaps I should repeat the terser message 
> that comees from primary.c (match_variable), "Expected VARIABLE at %C", 
> rather than "'%s' in the assignment at %L cannot be an l-value since it 
> is a procedure"?

Use 12.5.2.2 in the comment.  In future, if someone reads
the code, they will be able to understand the origins of
the string of comments.  I would use the terser message.  
How many green-behind-the-ear Fortran programmers will
understand "cannot be an l-value"?

-- 
Steve



More information about the Fortran mailing list