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

Mark Brown mark at csse.unimelb.edu.au
Sat Sep 5 15:17:46 AEST 2009


On 05-Sep-2009, Julien Fischer <juliensf at csse.unimelb.edu.au> 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.

(2) would always be an error, wouldn't it?

Cheers,
Mark.

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