Comment #0 by shammah.chancellor — 2013-11-25T13:25:59Z
This pragma(msg) prints twice when ran via `rdmd test`
test.d:
import std.stdio;
pragma(msg, void.sizeof);
void main() {
writeln("Hello World!");
}
Comment #1 by doob — 2013-11-25T23:34:06Z
This is due to RDMD will "compile" the code first to get the dependencies. After that it will do the actual complication which creates the binary.
Comment #2 by bearophile_hugs — 2013-11-26T00:20:31Z
(In reply to comment #1)
> This is due to RDMD will "compile" the code first to get the dependencies.
> After that it will do the actual complication which creates the binary.
Is __ctWriteln going to have the same problem? I think it will not.
Comment #3 by doob — 2013-11-26T01:00:27Z
(In reply to comment #2)
> Is __ctWriteln going to have the same problem? I think it will not.
I think that depends on how it's used and when it's executed in the compilation phase.