Bug 4868 – optlink doesn't complain about wrong extern declaration

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
tools
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2010-09-14T16:26:00Z
Last change time
2017-07-02T02:06:37Z
Keywords
diagnostic, Optlink
Assigned to
nobody
Creator
hoganmeier

Comments

Comment #0 by hoganmeier — 2010-09-14T16:26:39Z
testc.c ======= int foo; test.d ====== extern(C) { extern int foo; } void main() { foo = 1; } > dmc -c testc.c && dmd test.d testc.obj && test.exe object.Error: Access Violation
Comment #1 by dlang-bugzilla — 2017-07-02T02:06:02Z
Err, what's wrong with the extern declaration? The example compiles and links fine for me today. Closing as this bug is from 6 years ago, but please reopen if you can provide more details or a test case exhibiting the problem today.
Comment #2 by dlang-bugzilla — 2017-07-02T02:06:37Z
(In reply to Vladimir Panteleev from comment #1) > Err, what's wrong with the extern declaration? > > The example compiles and links fine for me today. (Forgot to add - also runs without an Access Violation)