D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 4868 - optlink doesn't complain about wrong extern declaration
Summary: optlink doesn't complain about wrong extern declaration
Status: RESOLVED WORKSFORME
Alias: None
Product: D
Classification: Unclassified
Component: tools (show other issues)
Version: D2
Hardware: Other Windows
: P2 normal
Assignee: No Owner
URL:
Keywords: diagnostic, Optlink
Depends on:
Blocks:
 
Reported: 2010-09-14 16:26 UTC by Trass3r
Modified: 2017-07-02 02:06 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Trass3r 2010-09-14 16:26:39 UTC
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 Vladimir Panteleev 2017-07-02 02:06:02 UTC
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 Vladimir Panteleev 2017-07-02 02:06:37 UTC
(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)