Bug 65409

Summary: behaviour of "fout << "" << endl;"
Product: [Retired] Red Hat Raw Hide Reporter: Tim Waugh <twaugh>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 1.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-05-24 10:32:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tim Waugh 2002-05-23 12:57:28 UTC
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 10:31:58 UTC
Known problem, there are 2 patches floating for this, waiting for Ben Kosnik's
approval.

Comment 2 Jakub Jelinek 2002-06-04 18:07:26 UTC
This is fixed in 3.1-4.