This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Allow omitting parentheses for ENTRY even in FUNCTIONs
- From: Tobias Schlüter <tobias dot schlueter at physik dot uni-muenchen dot de>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, fortran at gcc dot gnu dot org
- Date: Mon, 04 Jul 2005 22:59:26 +0200
- Subject: Re: [PATCH] Allow omitting parentheses for ENTRY even in FUNCTIONs
- References: <20050704203632.GR15087@devserv.devel.redhat.com>
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