*ping* Re: [Patch,Fortran] PR 47550 - add "Fortran 2008" -std= diagnostic for PURE + VALUE

Steve Kargl sgk@troutmask.apl.washington.edu
Fri Feb 11 21:39:00 GMT 2011


On Fri, Feb 11, 2011 at 10:12:45PM +0100, Tobias Burnus wrote:
> >>>+		gfc_notify_std (GFC_STD_F2008, "Fortran 2008: Argument '%s' "
> >>>+				"of pure subroutine '%s' at %L with VALUE "
> >>>+				"attribute but without INTENT", sym->name,
> >INTENT(IN)?  See above message.  Are the intent requirements
> >different for functions and subroutines?
> 
> Yes, the idea seems to be that a PURE function does not affect its 
> arguments while such a requirement does not make sense for subroutines. 
> Thus the standard has:
> 
> C1276 The specification-part of a pure function subprogram shall specify 
> that all its nonpointer dummy data objects have the INTENT (IN) or the 
> VALUE attribute.
> C1277 The specification-part of a pure subroutine subprogram shall 
> specify the intents of all its nonpointer dummy data objects that do not 
> have the VALUE attribute.

Thanks for the explanation.

-- 
Steve



More information about the Fortran mailing list