trans-intrinsic.c: question on FIXME

Paul Richard Thomas paul.richard.thomas@gmail.com
Fri May 25 09:01:00 GMT 2007


Daniel,

Please excuse me for breaking the thread.

> /* Evaluate the arguments to an intrinsic function.  */
> /* FIXME: This function and its callers should be rewritten so that it's
  not necessary to cons up a list to hold the arguments.  */

I think that we should raise a PR to ban cryptic comments:)

> static tree
> gfc_conv_intrinsic_function_args (gfc_se * se, gfc_expr * expr)


> Especially, what's so bad about the current implementation of
> "cons'ing up" a tree of arguments and how could one improve it?

I am not sure that this FIXME is sensible:

The function call interface that is being used here is

fncall = build_function_call_expr (fcn_decls, args);

where args is a TREE_LIST.  Filling this list is the function of the
    args = gfc_chainon_list (args, argse.expr); at the end of
gfc_conv_intrinsic_function_args.

Since:
2007-02-15  Sandra Loosemore  <sandra@codesourcery.com> we have had

fncall = build_call_expr (decl, nargs, arg1, arg2, arg3... argn);

I think that introducing a switchyard for 1 through 5 arguments that
have to be processed through gfc_conv_intrinsic_function_args anyway
would not result in code that was any more succinct.

Cheers

Paul



More information about the Fortran mailing list