Thread View: gnu.g++.lib.bug
1 messages
1 total messages
Started by Jeff Gehlhaar
Mon, 04 Jan 1993 02:17
Libg++ bug, version 2.3 (iostream)
Author: Jeff Gehlhaar
Date: Mon, 04 Jan 1993 02:17
Date: Mon, 04 Jan 1993 02:17
62 lines
2826 bytes
2826 bytes
// In article <1992Dec29.170317.20721@dfv.rwth-aachen.de> of gnu.g++.lib.bug,
// Martin Junius <mj@dfv.rwth-aachen.DE> writes:
// >Just noticed a strange bug when redirecting libg++ 2.3 iostream
// >output to a pipe: OUTPUT GETS LOST! This doesn't happen with
// >normal output or redirection to a file.
// I have noticed the same behavior. I have also noticed that after the
// initial line to cerr, output to cout also disappears. However, in a
// strange exception, output from manipulators such as endl still occurs,
// resulting in a blank lines in the output.
// Martin's original example is not reproducible here, but this sample does
// show the problem in our environment. (Jeff, please annotate this with
// our environmental specifics before forwarding it; it may be significant.)
// The result of ``g++ -v bug017.cc; a.out 2>&1 | cat; a.out'' is attached
// below. The blank lines are part of the output.
// -- Greg
#include <iostream.h>
main()
{
cerr << "Begin with line to cerr" << endl;
cerr << "Another line to cerr" << endl;
cout << "Try a line to cout" << endl;
cout << "Try another line to cout" << endl;
}
/* ====================== output is below
Reading specs from /usr/local/lib/gcc-lib/sparc-sun-sunos4.1/2.3.3/specs
gcc version 2.3.3
/usr/local/lib/gcc-lib/sparc-sun-sunos4.1/2.3.3/cpp -lang-c++ -v -undef
-D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -Dsparc -Dsun -Dunix -D__sparc__
-D__sun__ -D__unix__ -D__sparc -D__sun -D__unix bug017.cc
/usr/tmp/cca13773.i
GNU CPP version 2.3.3 (sparc)
/usr/local/lib/gcc-lib/sparc-sun-sunos4.1/2.3.3/cc1plus
/usr/tmp/cca13773.i -quiet -dumpbase bug017.cc -version -o
/usr/tmp/cca13773.s
GNU C++ version 2.3.3 (sparc) compiled by CC.
as -o /usr/tmp/cca137731.o /usr/tmp/cca13773.s
/usr/local/lib/gcc-lib/sparc-sun-sunos4.1/2.3.3/ld -e start -dc -dp
/lib/crt0.o -L/usr/local/lib/gcc-lib/sparc-sun-sunos4.1/2.3.3
-L/usr/local/lib /usr/tmp/cca137731.o -lg++ -lgcc -lc -lgcc
Begin with line to cerr
Begin with line to cerr
Another line to cerr
Try a line to cout
Try another line to cout
========================= output is above */
======================================================
Jeff Gehlhaar Qualcomm Inc,
jbg@qualcomm.com San Diego, CA, USA
(619) 597-5241 "The Elegant Solution...."
======================================================
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads