[Bug c++/103534] [12 regression] Spurious -Wstringop-overflow warning with std::string concatencation

2021-12-13 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103534 Jason Merrill changed: What|Removed |Added CC||redi at gcc dot gnu.org --- Comment

[Bug c++/103534] [12 regression] Spurious -Wstringop-overflow warning with std::string concatencation

2021-12-13 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103534 Jason Merrill changed: What|Removed |Added Resolution|--- |FIXED Status|NEW

[Bug c++/103534] [12 regression] Spurious -Wstringop-overflow warning with std::string concatencation

2021-12-10 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103534 --- Comment #10 from CVS Commits --- The master branch has been updated by Jason Merrill : https://gcc.gnu.org/g:2e8067041d1d69da02bd7578f58abc11eb35a04b commit r12-5906-g2e8067041d1d69da02bd7578f58abc11eb35a04b Author: Jason Merrill Date:

[Bug c++/103534] [12 regression] Spurious -Wstringop-overflow warning with std::string concatencation

2021-12-10 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103534 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment

[Bug c++/103534] [12 regression] Spurious -Wstringop-overflow warning with std::string concatencation

2021-12-10 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103534 --- Comment #8 from Martin Sebor --- We discussed before (e.g., in PR 93971) the idea of annotating std::string with some attribute telling the optimizer the internal pointer doesn't alias with anything except for the this->_M_local_buf or the

[Bug c++/103534] [12 regression] Spurious -Wstringop-overflow warning with std::string concatencation

2021-12-10 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103534 --- Comment #7 from Jason Merrill --- So it seems that this warning did find a real issue with the library, but one that was hard to connect to the actual wording of the message (and didn't affect the original testcase). In particular,

[Bug c++/103534] [12 regression] Spurious -Wstringop-overflow warning with std::string concatencation

2021-12-10 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103534 --- Comment #6 from Jason Merrill --- Created attachment 51970 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51970=edit libstdc++ fix

[Bug c++/103534] [12 regression] Spurious -Wstringop-overflow warning with std::string concatencation

2021-12-10 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103534 Jason Merrill changed: What|Removed |Added Priority|P3 |P1 CC|

[Bug c++/103534] [12 regression] Spurious -Wstringop-overflow warning with std::string concatencation

2021-12-06 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103534 Richard Biener changed: What|Removed |Added Target Milestone|--- |12.0

[Bug c++/103534] [12 regression] Spurious -Wstringop-overflow warning with std::string concatencation

2021-12-02 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103534 --- Comment #4 from Martin Sebor --- Yes, the warning does disappear when malloc() and free() are used instead of operator new and delete. foo() also ends up much better optimized, even at -O1: __attribute__((abi_tag ("cxx11"))) struct string

[Bug c++/103534] [12 regression] Spurious -Wstringop-overflow warning with std::string concatencation

2021-12-02 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103534 --- Comment #3 from Jonathan Wakely --- (In reply to Andrew Pinski from comment #2) > I also noticed that with -std=c++17 (or before), the constructor for > std::string is not inlined fully for both std::string objects which avoids > the false

[Bug c++/103534] [12 regression] Spurious -Wstringop-overflow warning with std::string concatencation

2021-12-02 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103534 Andrew Pinski changed: What|Removed |Added Keywords||alias, missed-optimization --- Comment

[Bug c++/103534] [12 regression] Spurious -Wstringop-overflow warning with std::string concatencation

2021-12-02 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103534 Martin Sebor changed: What|Removed |Added Keywords||diagnostic Last reconfirmed|