]> gcc.gnu.org Git - gcc.git/commit
libstdc++: Remove bogus assertion in std::from_chars [PR105324]
authorJonathan Wakely <jwakely@redhat.com>
Thu, 21 Apr 2022 10:26:49 +0000 (11:26 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Thu, 21 Apr 2022 10:31:51 +0000 (11:31 +0100)
commitcf37107522f465d9e12af01ba68d2d1df0f18d46
tree6831a07dd93f42be54f30327a0cfa3a765f70520
parent811c7fbd147991645e6116897f07d8a406b864e6
libstdc++: Remove bogus assertion in std::from_chars [PR105324]

I'm not sure what I was thinking when I added this assertion, maybe it
was supposed to be alignment == 1 (which is what the pmr::string actually
uses). The simplest fix is to just remove the assertion.

The assertion is no longer enabled by default on trunk, but it's still
there for the --enablke-libstdcxx-debug build, and is still wrong. The
fix is needed on the gcc-11 branch.

libstdc++-v3/ChangeLog:

PR libstdc++/105324
* src/c++17/floating_from_chars.cc (buffer_resource::do_allocate):
Remove assertion.
* testsuite/20_util/from_chars/pr105324.cc: New test.
libstdc++-v3/src/c++17/floating_from_chars.cc
libstdc++-v3/testsuite/20_util/from_chars/pr105324.cc [new file with mode: 0644]
This page took 0.067119 seconds and 5 git commands to generate.