tests/warnings/*.m:
Bring the programming style of these modules up to date,
except where the problem being tested for seems to be related
to the old programming style
In the infinite_recursion test case, add code that we *should*
warn about, but currently don't.
tests/warnings/*.m:
Update the expected outputs to account for the changes in line
numbers, and the fact that the compiler computes the contexts
of (if C then T else E) if-then-elses differently from (C -> T; E)
if-then-else (it takes the context of the "then" vs the context
of the ";").
Delete arg_order_rearrangment.exp2. It was long unused, but
deleting it in CVS would not have allowed us to put it back later.
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.
compiler/make_hlds_warn.m:
Implement the new warning.
Fix up another warning.
compiler/options.m:
Add the new option.
compiler/add_pragma.m:
compiler/pred_table.m:
Unrelated change: update some module qualifiers in a comment.
doc/user_guide.texi:
Document the new warning.
tests/warnings/Mercury.options:
tests/warnings/Mmakefile:
tests/warnings/warn_return.m:
tests/warnings/warn_return.exp*:
tests/warnings/warn_succ_id.m:
tests/warnings/warn_succ_id.exp*:
Test the output of the new warning.