D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 13292 - DMD accepts both -m32 and -m64
Summary: DMD accepts both -m32 and -m64
Status: RESOLVED WONTFIX
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 normal
Assignee: No Owner
URL:
Keywords: bootcamp, pull
Depends on:
Blocks:
 
Reported: 2014-08-14 06:18 UTC by Maxim Fomin
Modified: 2020-04-28 23:49 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Maxim Fomin 2014-08-14 06:18:28 UTC
It seems that dmd silently accepts simultaneously -m32 and -m64 and generates code according to last option. 

void main() {}

With -m32 -m64 it produces x64 and with -m64 -m32 it produces x86. It either should issue a warning or error.
Comment 1 Dlang Bot 2020-04-25 15:43:21 UTC
@wolframw created dlang/dmd pull request #11058 "Fix Issue 13292 - DMD accepts both -m32 and -m64" fixing this issue:

- Fix Issue 13292 - DMD accepts both -m32 and -m64

https://github.com/dlang/dmd/pull/11058
Comment 2 Mathias LANG 2020-04-28 23:49:56 UTC
As mentioned in the PR open by @woframw, this is actually not something we want. It's a common behavior of CLI to allow args to be overridden, and just take the last one into account. We have some switch that follow this behavior already (checkaction), and we rely on this behavior in our testsuite. Closing as WONTFIX.