Bug 11604 – pragma(msg,....) printed twice?

Status
RESOLVED
Resolution
INVALID
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-11-25T13:25:00Z
Last change time
2014-03-14T10:35:49Z
Assigned to
nobody
Creator
shammah.chancellor

Comments

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.