[Issue 19612] New: Wrong(?) code compiles
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Jan 24 18:39:39 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=19612
Issue ID: 19612
Summary: Wrong(?) code compiles
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: minor
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: porton at narod.ru
DMD v2.080.1 does compile the following code:
---
module test;
extern int xx(char v);
int xx(char v) { return 0; }
void main() {
}
---
In my opinion, it should not compile, because the function is both requested to
be linked from an outside library and is implemented in the object file itself.
This is a contradiction.
However, I may misunderstand.
--
More information about the Digitalmars-d-bugs
mailing list