[Bug tree-optimization/114374] [13/14/15/16 Regression] snprintf Wformat-truncation

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Mar 7 22:57:43 GMT 2026


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

--- Comment #10 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #5)
> Confirmed.
> 
> For some reason doing changing `loop++` to what it does manually does not
> warn:

That is because of the way the gimplifier works (from the looks of it, SCEV
does always look through copies).


E.g.
Changing g to do:
```
        int old = loop;
        loop = old+1;
```
We get the warning again.


More information about the Gcc-bugs mailing list