[m-dev.] for review: Underscore vars in pragma c code arguments

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Aug 4 17:34:27 AEST 1998


On 04-Aug-1998, Andrew Bromage <bromage at cs.mu.OZ.AU> wrote:
> +place_pragma_output_args_in_regs([Arg | Args], [Reg | Regs], Outputs) -->
>          { Arg = c_arg(Var, MaybeName, OrigType, _ArgInfo) },
>          code_info__release_reg(Reg),
>          code_info__set_var_location(Var, Reg),
> +        { MaybeName = yes(Name) ->
> +                (
> +                        % If the first char of the variable is an
> +                        % underscore, ignore it.
> +
> +                        string__first_char(Name, '_', _)
> +                ->
> +                        Outputs = Outputs0
> +                ;
> +                        Outputs = [pragma_c_output(Reg, OrigType, Name)
> +                                        | Outputs0]
> +                )
>          ;
> +                error("place_pragma_output_args_in_regs: unnamed arg")
> +        },

I don't understand why the `MaybeName = no' case is
treated differently than the case where the name starts
with an underscore.

> +output_descs_from_arg_info([Arg | Args], Outputs) :-

Likewise here.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.



More information about the developers mailing list