https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104789

--- Comment #11 from Martin Sebor <msebor at gcc dot gnu.org> ---
The direct store subset of -Wstringop-overflow that runs in the strlen pass
(i.e., those handled in strlen_pass::handle_store) might be better handled in
VRP and issued under -Warray-bounds.  The challenge there is that unlike this
-Wstringop-overflow subset which respects subobject boundaries, -Warray-bounds
intentionally considers complete objects (this was done to avoid false
positives).

So before moving all of strlen a solution to consider is to merge these two
sets of warnings while preserving the subobject sensitivity.

Another (indirectly related) improvement is to also move -Warray-bounds out of
VRP and into the access warning pass, and run it at the same times as most
other warnings there (that would also enable -Warray-bounds at -O0, which might
of course trigger some new false positives).

Reply via email to