On 05.02.2016 00:47, tsbockman wrote:
You can do the same thing in D if you try, but it's not natural at all
to use `extern(C)` for *internal* linkage of an all-D program like that.
Any competent reviewer would certainly question why you were using
`extern(C)`; this scores much lower in "underhanded-ness" than the
original C program.
We do have a lot of bindings to C libraries, though. When there's a
wrong alias in one of them, you have the same scenario.
Even so, I think that qualifies as a compiler bug or a hole in the D spec.
Can anything be done about it? The compiler simply has no way to verify
declarations, has it?