[PATCH] Allow omitting parentheses for ENTRY even in FUNCTIONs

Tobias Schlüter tobias.schlueter@physik.uni-muenchen.de
Mon Jul 4 20:59:00 GMT 2005


Jakub Jelinek wrote:
> gfortran only permits ENTRY foo without () in SUBROUTINEs, but not
> in FUNCTIONs.  g77 accepted omitting parentheses in both SOUBROUTINEs
> and FUNCTIONs and I can't find any wording in either F95 or F2003 standards
> that would disallow that.  There is just one entry-stmt and it has ()s
> optional and nothing says explicitely that parentheses must be used
> when ENTRY is present in a function.

I double-checked this, because the code looks like someone thought he knew
what he was doing when he called gfc_match_formal_arglist with different
arguments within 10 source lines, and agree with your judgement.

> 2005-07-04  Jakub Jelinek  <jakub@redhat.com>
> 
> 	* decl.c (gfc_match_entry): Allow ENTRY without parentheses
> 	even in FUNCTIONs.
> 
> 	* gfortran.fortran-torture/execute/entry_9.f90: New test.

Ok.

- Tobi



More information about the Fortran mailing list