https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98465
Martin Sebor changed:
What|Removed |Added
Keywords||patch
--- Comment #16 from Martin Sebor
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98465
Martin Sebor changed:
What|Removed |Added
See Also||https://gcc.gnu.org/bugzill
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98465
--- Comment #14 from Martin Sebor ---
Smallish test case independent of libstdc++ that reproduces both the false
positive (due to the missing aliasing constraint) and its absence (due to a
bug/limitation in tree_inlined_location). With
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98465
--- Comment #13 from Jakub Jelinek ---
Note, it is important to be able for -g0 to be able to optimize as many BLOCKs
as possible especially for LTO memory consumptions, so it should be just the
BLOCKs at inline boundaries that could be
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98465
--- Comment #12 from Martin Sebor ---
(In reply to Jeffrey A. Law from comment #10)
> What about fixing the -g interaction? Much like how -g shouldn't affect
> code generation, it probably shouldn't be affecting warnings like this.
>
> There
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98465
Jakub Jelinek changed:
What|Removed |Added
CC||jakub at gcc dot gnu.org
--- Comment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98465
Jeffrey A. Law changed:
What|Removed |Added
CC||law at redhat dot com
--- Comment #10
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98465
Martin Sebor changed:
What|Removed |Added
Status|NEW |ASSIGNED
Target Milestone|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98465
Martin Sebor changed:
What|Removed |Added
See Also||https://gcc.gnu.org/bugzill
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98465
--- Comment #7 from Martin Sebor ---
Adding #pragma GCC diagnostic ignore "-Wstringop-overread" to
string::_M_replace(size_type, size_type, const _CharT*, const size_type)
doesn't suppress the warning, either on trunk, or (with
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98465
--- Comment #6 from Martin Sebor ---
Different -std= settings also affect the warning, again as a result of inlining
and the explicit instantiation declarations. The basic_string.tcc file has the
following block toward the end which explains
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98465
--- Comment #5 from Martin Sebor ---
Comparing the code emitted by GCC 10 and the current trunk shows that the
former doesn't inline std::string::replace() regardless of the inlining limit.
The translation unit obtained with the former shows
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98465
--- Comment #4 from Martin Sebor ---
(In reply to Romain Geissler from comment #2)
> There seems to be a strange interaction between -Wsystem-headers and -g in
> gcc 11 which I don't understand.
Thanks for the -g hint; with it I can see it on
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98465
--- Comment #3 from Romain Geissler ---
I have found another example in my code base raising this error:
#include
std::string f1()
{
std::string aString = "string";
aString = "bigger str";
return aString;
}
With: -O2
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98465
--- Comment #2 from Romain Geissler ---
Hi Martin,
Thanks for your investigation.
I have a few questions:
- Since the warning seems to be fully emitted by system headers, shouldn't it
be silenced by default ? Why isn't it the case here ? On
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98465
Martin Sebor changed:
What|Removed |Added
CC||msebor at gcc dot gnu.org
16 matches
Mail list logo