Files
mercury/tests/warnings/profiling_builtin.exp
Zoltan Somogyi 07ffbce8e7 Implement --warn-sdtlib-shadowing.
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.
2022-01-08 04:41:55 +11:00

9 lines
579 B
Plaintext

profiling_builtin.m:006: Warning: this module, `profiling_builtin', has the
profiling_builtin.m:006: same name as a module in the Mercury standard
profiling_builtin.m:006: library. A third module cannot import both, and you
profiling_builtin.m:006: will likely have problems where a third module will
profiling_builtin.m:006: want to import one but will get the other.
profiling_builtin.m:006: The Mercury standard library module in question is
profiling_builtin.m:006: part of the Mercury implementation, and is not
profiling_builtin.m:006: publically documented.