[Bug libstdc++/42857] std::istream::ignore(std::streamsize n) calls unnecessary underflow

2020-11-10 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42857 --- Comment #10 from Jonathan Wakely --- Untested patch: --- a/libstdc++-v3/src/c++98/compatibility.cc +++ b/libstdc++-v3/src/c++98/compatibility.cc @@ -88,7 +88,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION {

[Bug libstdc++/42857] std::istream::ignore(std::streamsize n) calls unnecessary underflow

2020-11-10 Thread ncm at cantrip dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42857 --- Comment #9 from ncm at cantrip dot org --- (In reply to Jonathan Wakely from comment #8) > Probably changed by one of the patches for PR 94749 or PR 96161, although I > still see two reads for the first example. Thank you, I was mistaken. Thi

[Bug libstdc++/42857] std::istream::ignore(std::streamsize n) calls unnecessary underflow

2020-11-10 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42857 --- Comment #8 from Jonathan Wakely --- Probably changed by one of the patches for PR 94749 or PR 96161, although I still see two reads for the first example.

[Bug libstdc++/42857] std::istream::ignore(std::streamsize n) calls unnecessary underflow

2020-11-10 Thread ncm at cantrip dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42857 --- Comment #7 from ncm at cantrip dot org --- This bug appears not to manifest in g++-10.

[Bug libstdc++/42857] std::istream::ignore(std::streamsize n) calls unnecessary underflow

2014-07-23 Thread bugs at mm dot beanwood.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42857 --- Comment #6 from Andrew Ayer --- Any word on if this will be fixed in GCC? To summarize, GCC's current behavior is wrong because: * Underflowing after ignoring the requested number of bytes could block forever, breaking applications. * The

[Bug libstdc++/42857] std::istream::ignore(std::streamsize n) calls unnecessary underflow

2014-04-18 Thread cubbi at cubbi dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42857 Sergey Zubkov changed: What|Removed |Added CC||cubbi at cubbi dot org --- Comment #5 fro

[Bug libstdc++/42857] std::istream::ignore(std::streamsize n) calls unnecessary underflow

2013-02-24 Thread bugs at mm dot beanwood.com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42857 Andrew Ayer changed: What|Removed |Added CC||bugs at mm dot beanwood.com --- C

[Bug libstdc++/42857] std::istream::ignore(std::streamsize n) calls unnecessary underflow

2011-12-21 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42857 Paolo Carlini changed: What|Removed |Added CC||claytongdavis at gmail dot

[Bug libstdc++/42857] std::istream::ignore(std::streamsize n) calls unnecessary underflow

2010-09-20 Thread paolo dot carlini at oracle dot com
--- Comment #2 from paolo dot carlini at oracle dot com 2010-09-20 12:15 --- I was having a second look to this issue, and noticed something more which I missed the first time: the Standard, *only* in the case of getline(char_type*, streamsize, char_type) explicitly says "These conditio

[Bug libstdc++/42857] std::istream::ignore(std::streamsize n) calls unnecessary underflow

2010-01-27 Thread paolo dot carlini at oracle dot com
--- Comment #1 from paolo dot carlini at oracle dot com 2010-01-27 21:09 --- Putting aside the strange inconsistency of the second example, which could be easily fixed, and probably should anyway (we have an overload corresponding to n == 1 which calls sbumpc and should probably call sn