Bug creation and email sending has been disabled, file new bugs at gcc.gnu.org/bugzilla
Bug 3 - GDC prints some diagnostic information to stderr instead of stdout
Summary: GDC prints some diagnostic information to stderr instead of stdout
Status: RESOLVED WONTFIX
Alias: None
Product: GDC
Classification: Unclassified
Component: gdc (show other bugs)
Version: development
Hardware: All All
: --- normal
Assignee: Iain Buclaw
URL:
Depends on:
Blocks:
 
Reported: 2012-07-15 09:50 CEST by Alex Rønne Petersen
Modified: 2014-01-12 14:07 CET (History)
4 users (show)

See Also:


Attachments
Modifies output of -fd-verbose to go to stdout (5.19 KB, patch)
2013-04-30 17:46 CEST, Daniel Green
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Rønne Petersen 2012-07-15 09:50:21 CEST
GDC prints diagnostic messages like importall to stderr instead of stdout (DMD behavior). This isn't normally a problem, but since rdmd invokes "<compiler> -v -o- -Ipath path/script.d" and uses an stdout redirect to capture compiler output, it means that these diagnostics are shown in the user's terminal unnecessarily.

The solution would probably be to just print all of these to stdout, but I don't know if this goes against some GCC convention.
Comment 1 Iain Buclaw 2012-07-15 10:13:00 CEST
We could do, but it does not work with -pipe, which feeds everything sent to stdout straight to the assembler - think:  `gcc -o - | as -o foo.o`


For convenience, could simply error that options like -fd-verbose and -fvtls cannot work with -pipe.
Comment 2 Daniel Green 2013-04-30 17:46:40 CEST
Created attachment 35 [details]
Modifies output of -fd-verbose to go to stdout
Comment 3 Daniel Green 2013-04-30 17:49:05 CEST
I recently played with rdmd, and these are the modifications required to GDC to make it work.

As mentioned by ibuclaw, it won't work with -pipe and could probably use a few sanity checks for that condition.
Comment 4 jerro.public 2013-04-30 21:20:02 CEST
> I recently played with rdmd, and these are the modifications required to GDC to
> make it work.

One way to work around that would be to change rdmd to use -deps flag (-fdeps for GDC) to get dependencies instead of -v.
Comment 5 Johannes Pfau 2014-01-12 11:07:05 CET
Any updates here?
Comment 6 Iain Buclaw 2014-01-12 13:53:14 CET
I have no intention to direct any compiler diagnostic output to stdout in the forseeable future, if that's what you mean.
Comment 7 Johannes Pfau 2014-01-12 14:07:12 CET
OK, I'll close this as WONTFIX then.