This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/82103] spurious stringop-overflow warning


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

--- Comment #6 from Jeffrey A. Law <law at redhat dot com> ---
It should.  It may not though because one the n != 0 test is removed, the
resulting range of N is probably VR_VARYING rather than ~[0,0] at the call to
memset.

The former signifies we know nothing about the length and given how often that
likely occurs in practice I suspect the warning code suppresses the warning in
that case.

The latter says we know the range is everything except 0.  With that sliver of
information the warnings kick in.

It's a bit of speculation on my part, but it's informed speculation.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]