mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-19 03:13:40 +00:00
compiler/mercury_compile_main.m:
When we generate more messages for the user than we show, either
because of --limited-error-context options or because the user has
not asked for the verbose part of messages, we used to print a reminder
about this fact in only one case:
- at the end of the compilation, and
- only if the exit status wasn't zero.
Both of these condition was wrong.
- If we were compiling modules a, b, c, d ... z, we could get a message
about more messages being available being printed after the compilation
of a module (z) for which we generated *no* messages at all, just because
some message earlier in the list got such messages.
- If the compilation generated no errors but only warnings, then
we never printed reminders about any verbose parts of those warnings
being held back.
Fix both of these issues by
- separating the code doing the reminder into its own predicate,
and invoking it at the end of the processing of each module
(leaving a call at its old location where it is invoked
after we have processed all modules), and
- not making the invocation conditional on exit status.
tests/warnings/ambiguous_overloading.exp:
tests/warnings/arg_order_rearrangment.exp:
tests/warnings/bug477.exp:
tests/warnings/infinite_recursion.exp:
tests/warnings/simple_code.exp:
tests/warnings/singleton_test.exp:
tests/warnings/singleton_test.exp2:
tests/warnings/singleton_test.exp3:
tests/warnings/singleton_test.exp4:
Update these to expect the "For more information, recompile with `-E'"
message, now that we don't hide it.
tests/warnings/singleton_test.m:
Document what the four .exp files are for.
30 lines
1.8 KiB
Plaintext
30 lines
1.8 KiB
Plaintext
simple_code.m:014: Warning: this disjunct will never have any solutions.
|
|
simple_code.m:019: Warning: the condition of this if-then-else cannot fail.
|
|
simple_code.m:022: In clause for `p(in, out)':
|
|
simple_code.m:022: warning: unification of `X' and 2 cannot succeed.
|
|
simple_code.m:022: `X' has instantiatedness `unique(3)'.
|
|
simple_code.m:024: Warning: the condition of this if-then-else cannot succeed.
|
|
simple_code.m:029: Warning: the condition of this if-then-else cannot succeed.
|
|
simple_code.m:032: Warning: the negated goal cannot fail.
|
|
simple_code.m:032: Warning: the negated goal cannot succeed.
|
|
simple_code.m:034: Warning: the condition of this if-then-else cannot succeed.
|
|
simple_code.m:037: Warning: the negated goal cannot succeed.
|
|
simple_code.m:039: Warning: the condition of this if-then-else cannot fail.
|
|
simple_code.m:043: Warning: call to obsolete predicate
|
|
simple_code.m:043: `simple_code.obsolete1'/0.
|
|
simple_code.m:044: Warning: call to obsolete predicate
|
|
simple_code.m:044: `simple_code.obsolete2'/0.
|
|
simple_code.m:044: The suggested replacement is `pred42'/0.
|
|
simple_code.m:045: Warning: call to obsolete predicate
|
|
simple_code.m:045: `simple_code.obsolete3'/0.
|
|
simple_code.m:045: The possible suggested replacements are `pred42'/0 and
|
|
simple_code.m:045: `wonderful.pred43'/0.
|
|
simple_code.m:048: Warning: the condition of this if-then-else cannot fail.
|
|
simple_code.m:080: In clause for `r(in(bound(1)), out(bound(42)))':
|
|
simple_code.m:080: in argument 1 of clause head:
|
|
simple_code.m:080: warning: unification of `HeadVar__1' and 2 cannot succeed.
|
|
simple_code.m:080: `HeadVar__1' has instantiatedness `bound(1)'.
|
|
simple_code.m:113: Warning: recursive call to predicate `anc'/2 will lead to
|
|
simple_code.m:113: infinite recursion.
|
|
For more information, recompile with `-E'.
|