[Bug tree-optimization/102958] std::u8string suboptimal compared to std::string

2025-04-02 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102958 --- Comment #12 from Jonathan Wakely --- (In reply to Jonathan Wakely from comment #11) > Before r15-6990-g44d21551362f90 the code for g() was very branchy and > included branches that allocate memory, and so can throw bad_alloc. After > that co

[Bug tree-optimization/102958] std::u8string suboptimal compared to std::string

2025-04-02 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102958 Jonathan Wakely changed: What|Removed |Added Last reconfirmed|2022-12-12 00:00:00 |2025-4-2 --- Comment #11 from Jonatha

[Bug tree-optimization/102958] std::u8string suboptimal compared to std::string

2024-08-21 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102958 --- Comment #10 from GCC Commits --- The master branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:fd7dabc116b9abc40ee6aa25bcc5d240b8cc516a commit r15-3068-gfd7dabc116b9abc40ee6aa25bcc5d240b8cc516a Author: Jonathan Wakely Date

[Bug tree-optimization/102958] std::u8string suboptimal compared to std::string

2024-08-01 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102958 --- Comment #9 from Jonathan Wakely --- (In reply to Jonathan Wakely from comment #8) > Fixing the underlying optimization issue might be nice, but I don't see any > reason why std::char_traits::length can't simply use strlen. We'd > only need t

[Bug tree-optimization/102958] std::u8string suboptimal compared to std::string

2024-01-09 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102958 --- Comment #8 from Jonathan Wakely --- Fixing the underlying optimization issue might be nice, but I don't see any reason why std::char_traits::length can't simply use strlen. We'd only need to cast it to const char* (which is fine because we w

[Bug tree-optimization/102958] std::u8string suboptimal compared to std::string

2024-01-09 Thread aldyh at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102958 --- Comment #7 from Aldy Hernandez --- Created attachment 57016 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57016&action=edit preprocessed testcase with GCC13 Compile with -O2 -std=c++20

[Bug tree-optimization/102958] std::u8string suboptimal compared to std::string

2024-01-09 Thread aldyh at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102958 Aldy Hernandez changed: What|Removed |Added CC||aldyh at gcc dot gnu.org,

[Bug tree-optimization/102958] std::u8string suboptimal compared to std::string, triggers warnings

2021-12-10 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102958 --- Comment #5 from Jason Merrill --- Let's focus on the missed-optimization issues in this PR, and address the broader diagnostic issues in PR 103483.

[Bug tree-optimization/102958] std::u8string suboptimal compared to std::string, triggers warnings

2021-12-09 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102958 --- Comment #4 from CVS Commits --- The master branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:f8463b0e3ec2438b4cfb8c9a468d59761db2c8a0 commit r12-5874-gf8463b0e3ec2438b4cfb8c9a468d59761db2c8a0 Author: Jonathan Wakely Date:

[Bug tree-optimization/102958] std::u8string suboptimal compared to std::string, triggers warnings

2021-11-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102958 Andrew Pinski changed: What|Removed |Added Last reconfirmed||2021-11-25 Status|UNCONFIRM

[Bug tree-optimization/102958] std::u8string suboptimal compared to std::string, triggers warnings

2021-11-19 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102958 --- Comment #2 from CVS Commits --- The master branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:b8f2efaed02e8b03d215d74e42d3707761772f64 commit r12-5414-gb8f2efaed02e8b03d215d74e42d3707761772f64 Author: Jonathan Wakely Date:

[Bug tree-optimization/102958] std::u8string suboptimal compared to std::string, triggers warnings

2021-10-26 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102958 --- Comment #1 from Martin Sebor --- Something similar afflicts libstdc++-v3/testsuite/21_strings/basic_string/capacity/1.cc but that test is too contrived to matter in practice.