[Bug libstdc++/100146] __cpp_lib_to_chars not defined

2021-04-20 Thread gcc-bugs at marehr dot dialup.fu-berlin.de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100146 --- Comment #10 from gcc-bugs at marehr dot dialup.fu-berlin.de --- Thank you!

[Bug libstdc++/100146] __cpp_lib_to_chars not defined

2021-04-20 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100146 Jonathan Wakely changed: What|Removed |Added Resolution|--- |FIXED Status|NEW

[Bug libstdc++/100146] __cpp_lib_to_chars not defined

2021-04-20 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100146 --- Comment #8 from CVS Commits --- The releases/gcc-11 branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:73ac2cfc69f466d082bf6fd68f10447575ae0612 commit r11-8261-g73ac2cfc69f466d082bf6fd68f10447575ae0612 Author: Jonathan

[Bug libstdc++/100146] __cpp_lib_to_chars not defined

2021-04-20 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100146 --- Comment #7 from CVS Commits --- The master branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:f1a68574b1f8d2961d3a676dbcf0cc24b6368578 commit r12-6-gf1a68574b1f8d2961d3a676dbcf0cc24b6368578 Author: Jonathan Wakely Date:

[Bug libstdc++/100146] __cpp_lib_to_chars not defined

2021-04-19 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100146 --- Comment #6 from Jonathan Wakely --- I suppose this would be OK: #if _GLIBCXX_HAVE_USELOCALE # define __cpp_lib_to_chars 201611L #endif

[Bug libstdc++/100146] __cpp_lib_to_chars not defined

2021-04-19 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100146 --- Comment #5 from Jonathan Wakely --- It's std::from_chars which incorrectly allocates. It uses strtod which requires a null-terminated string.

[Bug libstdc++/100146] __cpp_lib_to_chars not defined

2021-04-19 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100146 --- Comment #4 from Jakub Jelinek --- The uselocale thing could be handled by defining the macros only if _GLIBCXX_HAVE_USELOCALE. Does any implementation actually handle it without memory allocations? I mean, even sprintf can fail with

[Bug libstdc++/100146] __cpp_lib_to_chars not defined

2021-04-19 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100146 --- Comment #3 from Jonathan Wakely --- No, because std::from_chars still depends on uselocale, and needs to allocate memory (which can fail, yielding an error code that isn't permitted by the standard).

[Bug libstdc++/100146] __cpp_lib_to_chars not defined

2021-04-19 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100146 --- Comment #2 from Jakub Jelinek --- Created attachment 50626 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50626=edit gcc11-pr100146.patch So do we want something like this patch then?

[Bug libstdc++/100146] __cpp_lib_to_chars not defined

2021-04-19 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100146 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org,