This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, Fortran] RFC: PR fortran/37779, diagnose "missing" recursive


On Sun, Nov 16, 2008 at 01:09:10PM +0100, Daniel Kraft wrote:
>  On the other hand, I guess this could lead to rejects-valid situations 
> and we should think about F77 compatibility where the solution of adding 
> "RECURSIVE" is not available.

Daniel,

I may not have understood what is written above.  It seems you
want to permit recursion without the RECURSIVE keyword to 
possibly allow Fortran 77 corner cases.  There are no corner
cases.  On page 15-2, in Section 15.2 of the Fortran 77 standard,
one finds:

  An external function specified by a function subprogram may be
  referenced within any other procedure subprogram or the main
  program of the executable program.  A subprogram must not
  reference itself, either directly or indirectly.

Then, on page 15-11, in Section 15.6.2,

  A subroutine specified in a subprogram may be referenced within
  any other procedure subprogram or the main program of the
  executable program.  A subprogram must not reference itself,
  either directly or indirectly.

Thus, Fortran 77 forbade recursion.  I think you want to make 
this an error.

-- 
Steve


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]