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] PR25098 - Variable as actual argument for procedure dummy argument allowed


Paul Thomas <paulthomas2@wanadoo.fr> wrote on Mon, 15 May 2006:
The detection of the error is effected in interface.c.  If the actual
argument is a variable and the formal argument flavor is procedure, the
only way in which this cannot be an error is if the procedure is
already compiled but not declared in the current namespace.  This is

Can you add a comment indicating where this is found in the standard? I find this quite surprising, and couldn't find it while looking briefly.


2006-05-15 Paul Thomas <pault@gcc.gnu.org>

   PR fortran/25098
   * interface.c (compare_parameter): If the actual argument is a
   variable and the formal a procedure, this can only not be an
   error if a gsymbol exists for a procedure of the same name.
   * (compare_actual_formal): Provide a specific error message for
   the case of a variable masquerading as a procedure.

I think it would be cleaner if you issue the error in compare_parameter (passing it the locus).


Apart from those two issues, this is of course ok.

- Tobi

:REVIEWMAIL:

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.



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