mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-16 18:03:36 +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.
4 lines
165 B
Plaintext
4 lines
165 B
Plaintext
bug477.m:036: Warning: recursive call to predicate `reconstruct_route'/3 will
|
|
bug477.m:036: lead to infinite recursion.
|
|
For more information, recompile with `-E'.
|