[Bug tree-optimization/89350] [9 Regression] Wrong -Wstringop-overflow= warning since r261518
marxin at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Feb 15 08:55:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89350
--- Comment #7 from Martin Liška <marxin at gcc dot gnu.org> ---
Thanks for analysis.
>
> The bogus warning can be avoided in the first case simply by punting on
> offsets that could be in the negative range, but almost certainly not
> without some false negatives.
Yes, I can confirm that adding a check for negative values can make
the warning gone.
> I'm not sure it's necessarily a good tradeoff
> (I don't know that it isn't either). Is this code representative of some
> wide-spread idiom?
I see it just in one package.
More information about the Gcc-bugs
mailing list