Skip to content

Issue 9302 - Extern is used both as a storage class and as a linkage attribute #237

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from Jan 12, 2013
Merged

Conversation

ghost
Copy link

@ghost ghost commented Jan 12, 2013

extern(C) int foo; // variable allocated and initialized in this module with C linkage
extern extern(C) int bar; // variable allocated outside this module with C linkage
// (e.g. in a statically linked C library or another module)
extern extern(D) int doo1; // variable allocated outside this module with D linkage
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this particular example serves any useful purpose since module variables with D linkage are mangled with the module name...

@ghost
Copy link
Author

ghost commented Jan 12, 2013

@alexrp: Yeah I added it for completeness sake, but I can see how C programmers might get confused when they start getting linkage failures. Removed that example.

alexrp added a commit that referenced this pull request Jan 12, 2013
Issue 9302 - Extern is used both as a storage class and as a linkage attribute
@alexrp alexrp merged commit eee1cd8 into dlang:master Jan 12, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants