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

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
So if I add:

        if (savepath->s_sz <= 0) __builtin_unreachable();
Before the check/setting of ->n. I get no warning.


If I unconditional set n to 0 rather than checking to see if it is greater than
0, I get no warning.

I think the warning might be correct due to GCC not being able to see all
pathes and knowing that n will never be negative.

Reply via email to