home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / gnu / g / lib / bug / 738 < prev    next >
Encoding:
Text File  |  1993-01-05  |  2.7 KB  |  77 lines

  1. Newsgroups: gnu.g++.lib.bug
  2. Path: sparky!uunet!cis.ohio-state.edu!qualcomm.com!jbg
  3. From: jbg@qualcomm.com (Jeff Gehlhaar)
  4. Subject: Libg++ bug, version 2.3 (iostream)
  5. Message-ID: <9301041716.AA17234@harvey>
  6. Sender: gnulists@ai.mit.edu
  7. Organization: GNUs Not Usenet
  8. Distribution: gnu
  9. Date: Mon, 4 Jan 1993 02:17:02 GMT
  10. Approved: bug-lib-g++@prep.ai.mit.edu
  11. Lines: 64
  12.  
  13. // In article <1992Dec29.170317.20721@dfv.rwth-aachen.de> of gnu.g++.lib.bug,
  14. // Martin Junius <mj@dfv.rwth-aachen.DE> writes:
  15. // >Just noticed a strange bug when redirecting libg++ 2.3 iostream 
  16. // >output to a pipe: OUTPUT GETS LOST! This doesn't happen with 
  17. // >normal output or redirection to a file.
  18.  
  19. // I have noticed the same behavior.  I have also noticed that after the
  20. // initial line to cerr, output to cout also disappears.  However, in a
  21. // strange exception, output from manipulators such as endl still occurs,
  22. // resulting in a blank lines in the output.
  23.  
  24. // Martin's original example is not reproducible here, but this sample does
  25. // show the problem in our environment.  (Jeff, please annotate this with
  26. // our environmental specifics before forwarding it; it may be significant.)
  27.  
  28. // The result of ``g++ -v bug017.cc; a.out 2>&1 | cat; a.out'' is attached
  29. // below.  The blank lines are part of the output.
  30.  
  31. // -- Greg
  32.  
  33. #include <iostream.h>
  34.  
  35. main()
  36. {
  37.         cerr << "Begin with line to cerr" << endl;
  38.         cerr << "Another line to cerr" << endl;
  39.         cout << "Try a line to cout" << endl;
  40.         cout << "Try another line to cout" << endl;
  41. }
  42.  
  43. /* ====================== output is below
  44. Reading specs from /usr/local/lib/gcc-lib/sparc-sun-sunos4.1/2.3.3/specs
  45. gcc version 2.3.3
  46.  /usr/local/lib/gcc-lib/sparc-sun-sunos4.1/2.3.3/cpp -lang-c++ -v -undef
  47. -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -Dsparc -Dsun -Dunix -D__sparc__
  48. -D__sun__ -D__unix__ -D__sparc -D__sun -D__unix bug017.cc
  49. /usr/tmp/cca13773.i
  50. GNU CPP version 2.3.3 (sparc)
  51.  /usr/local/lib/gcc-lib/sparc-sun-sunos4.1/2.3.3/cc1plus
  52. /usr/tmp/cca13773.i -quiet -dumpbase bug017.cc -version -o
  53. /usr/tmp/cca13773.s
  54. GNU C++ version 2.3.3 (sparc) compiled by CC.
  55.  as -o /usr/tmp/cca137731.o /usr/tmp/cca13773.s
  56.  /usr/local/lib/gcc-lib/sparc-sun-sunos4.1/2.3.3/ld -e start -dc -dp
  57. /lib/crt0.o -L/usr/local/lib/gcc-lib/sparc-sun-sunos4.1/2.3.3
  58. -L/usr/local/lib /usr/tmp/cca137731.o -lg++ -lgcc -lc -lgcc
  59. Begin with line to cerr
  60.  
  61.  
  62.  
  63. Begin with line to cerr
  64. Another line to cerr
  65. Try a line to cout
  66. Try another line to cout
  67. ========================= output is above */
  68.  
  69.  
  70. ======================================================
  71. Jeff Gehlhaar           Qualcomm Inc,  
  72. jbg@qualcomm.com        San Diego, CA, USA
  73. (619) 597-5241          "The Elegant Solution...."
  74. ======================================================
  75.  
  76.  
  77.