This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: *ping* Re: [Patch,Fortran] PR 47550 - add "Fortran 2008" -std= diagnostic for PURE + VALUE


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


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