Bug 65409 - behaviour of "fout << "" << endl;"
behaviour of "fout << "" << endl;"
Status: CLOSED RAWHIDE
Product: Red Hat Raw Hide
Classification: Retired
Component: gcc (Show other bugs)
1.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-05-23 08:57 EDT by Tim Waugh
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-05-24 06:32:04 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Tim Waugh 2002-05-23 08:57:28 EDT
Description of Problem: 
This program: 
 
#include <fstream> 
 
int main () 
{ 
        std::ofstream *out = new std::ofstream ("outputfile"); 
        *out << "hello" << std::endl; 
        *out << "" << std::endl; 
        *out << "world" << std::endl; 
} 
 
gives unexpected output with libstdc++-3.1-2, but expected output 
("hello\n\nworld") with libstdc++-3.1-1. 
 
Version-Release number of selected component (if applicable): 
libstdc++-3.1-2 
 
How Reproducible: 
100% 
 
Steps to Reproduce: 
1. g++ -o endl endl.cpp 
2. endl 
3. cat outputfile 
 
Actual Results: 
hello 
 
Expected Results: 
hello 
 
world 
 
Additional Information: 
This breaks the Omni build.
Comment 1 Jakub Jelinek 2002-05-24 06:31:58 EDT
Known problem, there are 2 patches floating for this, waiting for Ben Kosnik's
approval.
Comment 2 Jakub Jelinek 2002-06-04 14:07:26 EDT
This is fixed in 3.1-4.

Note You need to log in before you can comment on or make changes to this bug.