www.digitalmars.com         C & C++   DMDScript  

D.gnu - Bug: errors go to stdout ?

reply =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
When trying to compile something with GDC,
any errors encountered go to the stdout -
instead of the stderr like they should do.


This confuses the hell out of the assembler,
if trying to use the -pipe option to pass it
directly from the gdc frontend to as assembler.

# gdc -c typo.d
typo.d:2: no identifier for declarator typo
typo.d:2: semicolon expected, not 'EOF'

# gdc -c -pipe typo.d
{standard input}:0:End-of-File not at end of a line
{standard input}:1:Invalid mnemonic 'no'
{standard input}:1:End-of-File not at end of a line
{standard input}:unknown:Partial line at end of file ignored


They should go stderr, like they do with gcc:

# gcc -c typo.c
typo.c:1: error: parse error at end of input

# gcc -c -pipe typo.c
typo.c:1: error: parse error at end of input

--anders
Apr 14 2005
next sibling parent reply Stewart Gordon <smjg_1998 yahoo.com> writes:
Anders F Björklund wrote:
 When trying to compile something with GDC,
 any errors encountered go to the stdout -
 instead of the stderr like they should do.

This is a problem with DMD, not just GDC. It's been addressed before and a fix provided digitalmars.D.bugs/2001 digitalmars.D.bugs/3170 but AFAIK still waiting to be checked in. Stewart. -- My e-mail is valid but not my primary mailbox. Please keep replies on the 'group where everyone may benefit.
Apr 14 2005
parent =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
Stewart Gordon wrote:

 When trying to compile something with GDC,
 any errors encountered go to the stdout -
 instead of the stderr like they should do.

<snip> This is a problem with DMD, not just GDC. It's been addressed before and a fix provided

But that was with uncaught exceptions, right ? This was output from the GDC compiler itself... But you are right, they should both go to stderr. (both the uncaught Errors, and the compile errors) --anders
Apr 14 2005
prev sibling parent =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
Anders F Björklund wrote:

D.gnu/1152

 When trying to compile something with GDC,
 any errors encountered go to the stdout -
 instead of the stderr like they should do.

This bug is still present in GDC 0.11 :-( Unfortunately it pretty much rules out using "-pipe", which otherwise gives a nice speedup. --anders
Apr 28 2005