[Patch, Fortran] IMPLICIT fixes

Tobias Burnus burnus@net-b.de
Thu Oct 9 20:27:00 GMT 2014


Hi all,

this patch fixes Alan's issue with IMPLICIT followed by ";". I am not 
sure whether using the _eos machinery is really needed – especially as 
"!" seem to be already handled.

Additionally, I missed the inner "[...]" for the new:

R563 implicit-stmt  is  IMPLICIT implicit-spec-list
                     or  IMPLICIT NONE [ ( [ implicit-none-spec-list ] ) ]


Namely,  "IMPLICIT NONE ()" is also valid - but was rejected before. As 
implicit-none-spec implies type,* that's now also handled.
(* "An IMPLICIT statement specifies the mapping for the letters in its 
letter-spec-list. IMPLICIT NONE with an implicit-none-spec of TYPE or 
with no implicit-none-spec-list specifies the null mapping for all the 
letters.")

And finally, Dominque correctly observed that the location of some of 
the error messages was rather off, e.g. if there was a long comment 
following the actual statement. Hence, I have modified the code to 
provide a better error message.

Build and regtested on x86-64-gnu-linux.
OK for the trunk?

Tobias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: implicit.diff
Type: text/x-patch
Size: 6070 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20141009/bdf7339d/attachment.bin>


More information about the Fortran mailing list