for review: unused_args & pragma c_code

Zoltan Somogyi zs at cs.mu.OZ.AU
Sun Jan 25 19:06:42 AEDT 1998


> Zoltan, can you please review this one?
> 
> compiler/unused_args.m:
> 	If a variable in a `pragma c_code' declaration does not
> 	have a name (i.e. it is an underscore variable), then it
> 	can't be used by the C code.

The code looks OK.

I don't recall the mailing list having come to any conclusion about
how we will eventually allow C code to access the typeinfos of the
arguments. If the predicate is polymorphic, then the mechanism we
decide on (if we do) will either need to undo this change or give a name
to any unnamed parameters representing needed typeinfo structures.

You should modify the comment in hlds_goal.m to say that any unused
variable can be optimized away.

Zoltan.



More information about the developers mailing list