Bug 5031 – pragma(msg,...) outputs to stderr, not stdout
Status
RESOLVED
Resolution
INVALID
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2010-10-09T17:36:00Z
Last change time
2015-06-09T05:10:42Z
Assigned to
nobody
Creator
bus_dbugzilla
Comments
Comment #0 by bus_dbugzilla — 2010-10-09T17:36:53Z
pragma(msg,...) messages are not inherently errors, so it should output to stdout, not stderr. But currently it outputs to stderr:
-------------
> type test.d
pragma(msg, "hello");
> dmd -c test.d > out.txt
hello
> type out.txt
> dmd -c test.d 2> out.txt
> type out.txt
hello
-------------
Comment #1 by bugzilla — 2012-01-19T14:00:44Z
Their normal usage is to provide user-friendly error messages, so they should got to stderr.