This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, Fortran] RFC: PR fortran/37779, diagnose "missing" recursive
- From: Tobias Burnus <burnus at net-b dot de>
- To: Daniel Kraft <d at domob dot eu>
- Cc: Fortran List <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 23 Nov 2008 20:54:25 +0100
- Subject: Re: [Patch, Fortran] RFC: PR fortran/37779, diagnose "missing" recursive
- References: <49200D66.8090100@domob.eu> <49288106.2090701@domob.eu>
Daniel Kraft wrote:
> once again a slightly revised version; I converted the warnings back
> to errors as suggested by Paul and Tobias. The second change is that
> I converted the calls inside resolve_actual_arglist from
> resolve_procedure_expression to the general gfc_resolve_expr, so as to
> "fix the problem" that this was never called for procedure actual
> argument expressions. I believe this is the cleaner solution, but I'm
> also fine with using the old version of the patch instead.
>
> No regressions on GNU/Linux-x86-32 for this one, either.
OK. Maybe it is better to change the gfc_error back to a warning as one
can indeed produce valid programs (which do some thing) using procedure
pointers.
At least for proc pointer that would be in line with Dominique's and
Jerry's preference, with James' program (see c.l.f), and I also don't
feel well rejecting valid programs. One could do it context dependent,
i.e. only reject actual arguments and warn for the rest, but that seems
to be more work, which could be deferred to a later patch (if needed).
(I checked with a couple of compilers, for actual arguments ifort and
NAG f95 give an error; for proc pointers: ifort does not support
"procptr => self" at all and NAG does not support proc pointers. g95
(incl. proc pointer), sunf95, openf95, pgf95 and pathf95 print no
diagnostics.)
Tobias