[Bug libstdc++/37475] codecvt::do_in/do_out functions return "ok" when the output sequence has zero length

2024-06-27 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37475 Jonathan Wakely changed: What|Removed |Added Status|ASSIGNED|RESOLVED Target Milestone|---

[Bug libstdc++/37475] codecvt::do_in/do_out functions return "ok" when the output sequence has zero length

2024-06-27 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37475 --- Comment #16 from GCC Commits --- The master branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:73ad57c244c283bf6da0c16630212f11b945eda5 commit r15-1693-g73ad57c244c283bf6da0c16630212f11b945eda5 Author: Jonathan Wakely

[Bug libstdc++/37475] codecvt::do_in/do_out functions return "ok" when the output sequence has zero length

2024-06-17 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37475 --- Comment #15 from Jonathan Wakely --- Oops, that's definitely not intended! Good catch, thanks.

[Bug libstdc++/37475] codecvt::do_in/do_out functions return "ok" when the output sequence has zero length

2024-06-17 Thread kristian.spangsege at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37475 --- Comment #14 from Kristian Spangsege --- Is the underscore intended before `Guard` in `explicit _Guard(__c_locale) { }` for the GLIBC <= 2.2 case? Besides that, the full patch looks correct to me.

[Bug libstdc++/37475] codecvt::do_in/do_out functions return "ok" when the output sequence has zero length

2024-06-12 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37475 Jonathan Wakely changed: What|Removed |Added Status|NEW |ASSIGNED

[Bug libstdc++/37475] codecvt::do_in/do_out functions return "ok" when the output sequence has zero length

2024-06-11 Thread kristian.spangsege at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37475 --- Comment #12 from Kristian Spangsege --- These changes look good to me. A couple of points: * Should the `else`s still be there now that the preceding branches terminate with `break`? * `do_out()` has the same problem as `do_in()`. * If

[Bug libstdc++/37475] codecvt::do_in/do_out functions return "ok" when the output sequence has zero length

2024-06-11 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37475 --- Comment #11 from Jonathan Wakely --- This changes the loop to always run if the input is non-empty, and so return partial if the destination is empty. --- a/libstdc++-v3/config/locale/gnu/codecvt_members.cc +++

[Bug libstdc++/37475] codecvt::do_in/do_out functions return "ok" when the output sequence has zero length

2024-06-11 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37475 --- Comment #10 from Jonathan Wakely --- Whereas the GNU locale has that check inside a loop, which is never entered when the destination buffer is zero sized, i.e. __to == __to_end if (__from_next < __from_end && __ret == ok)

[Bug libstdc++/37475] codecvt::do_in/do_out functions return "ok" when the output sequence has zero length

2024-06-11 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37475 --- Comment #9 from Jonathan Wakely --- (In reply to Kristian Spangsege from comment #7) > Curiously, this bug does not occur when using the Cygwin or MinGW versions > of GCC. In these cases, the result is `partial` as it should be. I assume >

[Bug libstdc++/37475] codecvt::do_in/do_out functions return ok when the output sequence has zero length

2008-09-11 Thread tsyvarev at ispras dot ru
--- Comment #1 from tsyvarev at ispras dot ru 2008-09-11 09:35 --- Created an attachment (id=16291) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16291action=view) test.cpp -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37475

[Bug libstdc++/37475] codecvt::do_in/do_out functions return ok when the output sequence has zero length

2008-09-11 Thread paolo dot carlini at oracle dot com
--- Comment #2 from paolo dot carlini at oracle dot com 2008-09-11 10:31 --- http://gcc.gnu.org/ml/libstdc++/2008-09/msg00090.html -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37475