Bug 80490

Summary: won't re open files in simple program
Product: [Retired] Red Hat Linux Reporter: Need Real Name <t-anderson>
Component: libstdc++Assignee: Jakub Jelinek <jakub>
Status: CLOSED NOTABUG QA Contact: Jay Turner <jturner>
Severity: low Docs Contact:
Priority: medium    
Version: 8.0CC: bkoz, srevivo
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-01-17 17:25:32 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
sample code none

Description Need Real Name 2002-12-27 05:40:40 UTC
Description of problem:
In a simple do ...while loop program to open a file as many times as the user 
wants, Red Hat 8.0 will not open the file more than once.  It worked in 7.3, 
so it appears that I am missing part of a new update , or something is missing.

Thanks,
Tom

Version-Release number of selected component (if applicable):


How reproducible:
every time

Steps to Reproduce:
1. compile and execute (see code and typescript below)
2.
3.
    
Actual results:
on second loop through program, fails to open source file

Expected results: expected it to open source file


Additional info:

Comment 1 Need Real Name 2002-12-27 05:44:50 UTC
Created attachment 88938 [details]
sample code 

sample output:

[Tom@localhost Tom]$ ./a.out
Opening file a.dat
abcdef
repeat? (y/n): n y
Opening file a.dat
failed to open.

repeat? (y/n): y
Opening file a.dat
failed to open.

repeat? (y/n): n
bye.

Comment 2 Jens Petersen 2003-01-15 17:37:50 UTC
Assigning to libstdc++ component, since your example is in C++.

Comment 3 Benjamin Kosnik 2003-01-17 17:21:00 UTC
This is a change in behavior, but is not a bug. Please read this:

http://gcc.gnu.org/onlinedocs/libstdc++/faq/index.html#4_4_iostreamclear