Date: Fri, 21 Jun 2002 20:13:15 +0300 (WET) From: Andris Pavenis X-Sender: pavenis AT ieva06 To: selim delioglu Cc: djgpp AT delorie DOT com Subject: Re: Wrong behaviour in c++ program/ using gcc&gpp 3.1 In-Reply-To: <000901c21940$5f955a20$04c5afc3@n> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Fri, 21 Jun 2002, selim delioglu wrote: > [selim@~/c]$ gcc -v > Reading specs from d:/djgpp/lib/gcc-lib/djgpp/3.1/specs > Configured with: ../configure i586-pc-msdosdjgpp > --prefix=/dev/env/DJDIR --disable-nls > Thread model: single > gcc version 3.1 > > #include > using namespace std; > int main() { > char buffer[100]; > cin.getline(buffer, 100); > cout << buffer << endl; > return 0; > } > > Here comes the problem. I am using DJGPP without problems for a > long time (more than one year). I used before (gcc & gpp) 2.95.3, and > later upgraded to gcc&gpp 3.0.4. After I upgraded to gcc 3.1 I found > a misbehaviour for the above code. > Normal behaviour is that: after running the program user enters > one line ending with a newline and the program displays that line > again. But after upgrading to gcc 3.1 & gpp 3.1 I have to press > "enter" twice to end the input to the program. I think that this > is a bug in the c++ library that comes with gpp 3.1, because with > the same c library (from djdev203.zip) the program runs as expected, > if I use gcc&gpp 3.0.4 or gcc&gpp 2.95.3. > Confirmed with gcc-3.1 both for DJGPP and Linux. Tried this night build of gcc-3.1.1 prerelease (from CVS) under Linux. Bug did not appear then. So that bug appears under Linux with gcc-3.1 but no more with gcc-3.1.1 20020620 (prerelease). So it evidently will be fixed in gcc-3.1.1 release Andris