delorie.com/archives/browse.cgi | search |
From: | pavenis AT lanet DOT lv |
To: | salvador <salvador AT inti DOT gov DOT ar>, djgpp-workers AT delorie DOT com |
Date: | Sat, 29 Sep 2001 15:17:22 +0300 |
MIME-Version: | 1.0 |
Subject: | Re: GCC 3.01 Streams problem |
Message-ID: | <3BB5E602.16332.35BCB7@localhost> |
In-reply-to: | <3BB4D5C1.12443.6387C@localhost> |
References: | <3BB47CE0 DOT 106BF5AF AT inti DOT gov DOT ar> |
X-mailer: | Pegasus Mail for Win32 (v3.12c) |
Reply-To: | djgpp-workers AT delorie DOT com |
Errors-To: | nobody AT delorie DOT com |
X-Mailing-List: | djgpp-workers AT delorie DOT com |
X-Unsubscribes-To: | listserv AT delorie DOT com |
On 28 Sep 2001, at 19:55, pavenis AT lanet DOT lv wrote: > Verified with following versions: > > i586-pc-msdosdjgpp gcc-3.0.1 release > i586-pc-msdosdjgpp gcc-3.1 20010927 (experimental) > i686-pc-linux-gnu gcc-3.0.2 20010927 (prerelease) > > This problem were present in all 3 cases (so also under Linux). > So I think it's a serious regression against gcc-2.95.X not only > for DJGPP but also under Linux Looked in draft of C++ standard |ftp://research.att.com/dist/c++std/WP/ It's said there (27.6.1.3): If the function inserts no characters, it calls setstate(failbit), which may throw ios_base::failure (27.4.5.3). I think it's the same behaviour as we see. Maybe it's better to use getline instead of get and clean trailing LF after reading (getline should not have this problem as it reads delimiting char, so no zero bytes on empty lines) Andris
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |