*ping* Re: [Patch,Fortran] PR 47550 - add "Fortran 2008" -std= diagnostic for PURE + VALUE
Tobias Burnus
burnus@net-b.de
Fri Feb 11 21:12:00 GMT 2011
Steve Kargl wrote:
> Whoops. I thought you had committed this. See some style issues below.
> OK to commit after addressing comments.
Thanks for the review.
Regarding the spacing issue: That seems to be a quoting bug in
Thunderbird. The local version of patch and the original email seem to
be OK: http://gcc.gnu.org/ml/fortran/2011-02/msg00059.html
Regarding:
>>> + 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.
Committed as Rev. 170060.
Tobias
More information about the Fortran
mailing list