Mercury Bugs - mercury
View Issue Details
0000579mercuryBugpublic2025-12-13 14:592025-12-15 04:21
Reporterjuliensf 
Assigned Tozs 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000579: Unrecognised options in Mercury.options files not reported correctly
DescriptionAttempting to compile a program with mmc --make (e.g. samples/hello.m) and a Mercury.options file containing the following:

    MCFLAGS=--i-am-not-an-option

causes the compiler to print:

mercury_compile:
Error: the location of the directory that holds the Mercury standard library is
  not specified
  either by an `--mercury-stdlib-dir' option,
  or by an environment variable named `MERCURY_STDLIB_DIR',
  or by a make variable named `MERCURY_STDLIB_DIR' in any specified options

Additional InformationThis is occurring as far back as rotd-2025-06-30. Mercury 22.01.8 does
print an appropriate error message, namely:

    unrecognized option `--i-am-not-an-option'

(An additional irritation here is that neither the --help or --version options works in the presence of a Mercury.options file containing an error.)


TagsNo tags attached.
Attached Files

Notes
(0001236)
juliensf   
2025-12-13 19:46   
Also occurs when the compiler is invoked to build a single module program,
e.g. mmc hello
(0001237)
zs   
2025-12-14 18:12   
I think I added this bug on 2023 jul 12. I am testing a fix.
(0001238)
zs   
2025-12-15 04:21   
Fix committed 2025 dec14.

Issue History
2025-12-13 14:59juliensfNew Issue
2025-12-13 19:46juliensfNote Added: 0001236
2025-12-14 18:12zsNote Added: 0001237
2025-12-15 04:21zsAssigned To => zs
2025-12-15 04:21zsStatusnew => resolved
2025-12-15 04:21zsResolutionopen => fixed
2025-12-15 04:21zsNote Added: 0001238