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


tobi,

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.

I don't think that it is in the standard but it is the present behaviour of gfc and other compilers. The lack of an external declaration or an explicit interface could be signalled, depending on the standard.



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).

Why don't I trap the error separately in compare_actual_formal. You are right about the construct being awkward but I was trying to restore some symmetry in compare_parameter.


Paul


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