D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 5031 - pragma(msg,...) outputs to stderr, not stdout
Summary: pragma(msg,...) outputs to stderr, not stdout
Status: RESOLVED INVALID
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: Other Windows
: P2 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-09 17:36 UTC by Nick Sabalausky
Modified: 2015-06-09 05:10 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Nick Sabalausky 2010-10-09 17:36:53 UTC
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 Walter Bright 2012-01-19 14:00:44 UTC
Their normal usage is to provide user-friendly error messages, so they should got to stderr.