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: [email protected]
          Reporter: [email protected]

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.

--

Reply via email to