[m-rev.] for review: --warn-suspicious-foreign-procs

Julien Fischer juliensf at csse.unimelb.edu.au
Mon Sep 7 17:15:45 AEST 2009


On Sat, 5 Sep 2009, Julien Fischer wrote:

>
> Add a new warning, --warn-suspicious-foreign-procs.
> This checks the bodies of foreign_proc pragmas for possible errors.
> Currently, these errors are:
>
> (1) the presence of SUCCESS_INDICATOR (or in Java, succeeded),
> in foreign procs. for predicates that cannot fail.
>
> (2) the lack of SUCCESS_INDICATOR (succeeded) in foreign procs.
> for predicates that can fail.
>
> (3) the presence of "return" (or "ret" or "jmp" in IL).  This could
> indicate the presence of a return statement in the foreign proc.
>
> Potentially, we could also check for the presence of the this
> pointer in Java and C# foreign_procs, but that isn't implemented
> at the moment.
>
> The warning is disabled by default, since it will produce spurious
> results if the things it checks for occur in foreign language
> comments.

Are there any other comments on this one?  I would like to commit
it before tonight's builds begin.

Julien.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list