mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-19 03:13:40 +00:00
compiler/mercury_compile_main.m:
I added that option a week or so ago, but at that time, it did nothing.
This diff implements the warning.
library/LIB_FLAGS.in:
Disable the warning for the modules in the library directory.
configure.ac:
Require the installed compiler to recognize the option, since without this,
library/LIBFLAGS won't work.
tests/warnings/profiling_builtin.{m,exp}:
tests/warnings/time.{m,exp}:
tests/warnings/time.subtime.m:
Two test cases for the warning. One, time, shadows the name of
a documented library module, the other, profiling_builtin,
shadows the name an undocumented library module.
The purpose of time.subtime is to test the message when the module name
*contains* a stdlib module name, but is not *identical* to it.
tests/warnings/Mmakefile:
Do *not* turn on the new test cases, but do document why we do not do so.
5 lines
285 B
Plaintext
5 lines
285 B
Plaintext
time.m:005: Warning: this module, `time', has the same name as a module in the
|
|
time.m:005: Mercury standard library. A third module cannot import both, and
|
|
time.m:005: you will likely have problems where a third module will want to
|
|
time.m:005: import one but will get the other.
|