(j3.2006) (SC22WG5.5689) [ukfortran] AW: RE: F08/C201
Thu Mar 17 08:56:20 EDT 2016
When I first read through this, it appeared that C201 was just not adjusted to account for the new BLOCK construct. It seems like the simplest fix, with the least danger of causing problems elsewhere, would be minimal exclusion: Change the beginning of C201 to ?Except as part of an <interface-block> contained in a <block-construct>, an <execution-part>...?
On Mar 17, 2016, at 12:54 AM, Cohen Malcolm <malcolm at nag-j.co.jp> wrote:
> The way that the end statements are counted in <action-stmt> and C201
> excludes them from appearing as executable constructs is at best confusing,
> whether it is technically wrong or not.
> FWIW, on close examination I do think it probably is technically wrong, as
> the end statement (does not need "subroutine" - that is an optional keyword
> in this context) in the interface body in the BLOCK construct is indeed
> reached via executable-construct.
> Not that a compiler is likely to take that interpretation.
> This could be patched by modifying C201, but since this looks like a very
> confusing way of describing the grammer anyway, I would be more in favour of
> getting the end statements out of action-stmt and inserting them as
> necessary elsewhere, unless that turns out to be more difficult than it
> looks. We would certainly want to be very careful how we change this
> otherwise the chance of incidental BNF breakage would be quite high.
> -----Original Message-----
> From: Robert Corbett
> Sent: Wednesday, March 16, 2016 9:04 PM
> To: fortran standards email list for J3
> Cc: Forcheck ; Bader, Reinhold ; 'WG5'
> Subject: [ukfortran] (SC22WG5.5686) (j3.2006) AW: RE: F08/C201
> On 03/16/16 00:46, Bader, Reinhold wrote:
>> Hi Erik,
>> my impression is that C201 only closes a hole that would otherwise permit
>> improper nesting of statements with respect to executable constructs,
>> end subroutine
>> end block
> You and Erik raise a fair point. Constraint C201 has the same effect on the
> syntax as would be achieved by deleting the alternatives
> /end-mp-subprogram-stmt/, /end-program-stmt/, and /end-subroutine-stmt/ from
> rule R214 (rule R215 of 16-007), which is the syntax definition of an
> /action-stmt/. I suspect that the intended purpose of including those
> alternatives is to indicate that those forms of END statements are
> constructs. That does not work, because none of the cases where one of
> forms of END statements is produced by the grammar are derived (indirectly)
> the syntax term /executable-construct/ because of the constraint.
> Robert Corbett
> ukfortran mailing list
> ........................Malcolm Cohen, Nihon NAG, Tokyo.
> J3 mailing list
> J3 at mailman.j3-fortran.org
Bill Long longb at cray.com
Fortran Technical Support & voice: 651-605-9024
Bioinformatics Software Development fax: 651-605-9142
Cray Inc./ Cray Plaza, Suite 210/ 380 Jackson St./ St. Paul, MN 55101
More information about the J3