home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: gnu.g++.lib.bug
- Path: sparky!uunet!cis.ohio-state.edu!qualcomm.com!jbg
- From: jbg@qualcomm.com (Jeff Gehlhaar)
- Subject: Libg++ bug, version 2.3 (iostream)
- Message-ID: <9301041716.AA17234@harvey>
- Sender: gnulists@ai.mit.edu
- Organization: GNUs Not Usenet
- Distribution: gnu
- Date: Mon, 4 Jan 1993 02:17:02 GMT
- Approved: bug-lib-g++@prep.ai.mit.edu
- Lines: 64
-
- // 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...."
- ======================================================
-
-
-